I wrote a ChatOps bot for the open source collaboration tool Mattermost using this framework. Now I want to write some integration tests and run them. When I follow the steps to run the integration tests from their project, they won't succeed. I used the command pytest --capture=no --log-cli-level=DEBUG .
to run the integration tests.
It fails because localhost:8065
is not available yet after running the command docker-compose up -d
. Anybody knows what I'm doing wrong?
CodePudding user response:
Are you on Linux, Mac, or Windows? I think network_mode: host
only works on Linux.
Try to edit the docker-compose.yml
file, remove the network mode "host", and add a port mapping, something like this:
version: "3.7"
services:
app:
container_name: "mattermost-bot-test"
build: .
command: ./mm/docker-entry.sh
ports:
- "8065:8065"
extra_hosts:
- "dockerhost:127.0.0.1"