Hello there.
I’m trying to set up a simple acceptance test using codeception (PHP) and gitlab. All the test does is visit the homepage of my app and confirm the existence of some text. It doesn’t rely on Selenium or anything, it just uses the Guzzle library which under the hood uses curl. The test works fine when I run it from inside the container on my local machine.
However, when it runs via CI
I get a cURL error saying: “Failed to connect to localhost port 80: Connection Refused”. This leads me to believe that the command is not being run from inside the container but rather from the virtual machine that the runner is running from.This is the step being run:
tests:
stage: test
script:
- ./vendor/bin/codecept run --steps
only:
- /^feature\/.+/
How can I get the tests to run from inside the container? If not possible, how can I run them successfully from outside the container. Something like ‘docker exec <command’. Problem with the second solution is 1 docker is not installed and 2 I don’t know the container name.