Closed minsis closed 3 years ago
I guess I should've read this a bit closer for the circleci stuff. I'm assuming the above only needs to be replaced with something as simple as
command: docker-compose -f tests/st2tests.yaml
The only thing I'm not sure about is this container does an exit code. I'm not sure how circleci handles that? I'm guessing it passes on == 0
and fails on != 0
That's correct. Non-zero exit code should indicate a failure in CircleCI.
Let's see what CircleCI says after running the tests there.
Tests failed because docker-compose by default uses the top-level directory name for creating its namespace. In the circle ci config its set to ~/docker
.
docker-compose up --detach
Creating network "docker_private" with driver "bridge"
Creating network "docker_public" with driver "bridge"
docker-compose -f tests/st2tests.yaml up
Creating network "tests_default" with the default driver
ERROR: Network st2-docker_private declared as external, but could not be found. Please create the network manually using `docker network create st2-docker_private` and try again.
So a couple of things:
~/docker
to ~/st2-docker
Step 1 is easiest way to deal with this unless there was some specific reason the working directory needed to be called docker
Step 2 above fails.
networks:
${CIRCLE_WORKING_DIRECTORY:-st2-docker_private}:
external: true
WARNING: Some networks were defined but are not used by any service: ${CIRCLE_WORKING_DIRECTORY:-st2-docker_private}
ERROR: Service "st2test" uses an undefined network "st2-docker_private"
I changed the working dir name to ~/st2-docker
and build is passing now.
closes #197
Adds a basic BATS smoke test to verify the st2-docker stack is functional.
Closes #197