Skip to content

Commit

Permalink
Try to make connection test work with coverage (#39)
Browse files Browse the repository at this point in the history
* Try to make connection test work with coverage.

ci_coverage

* Don't run test inside containers.

ci_coverage

* Empty commit to run without coverage.
  • Loading branch information
felixfontein authored Nov 24, 2020
1 parent 219c6b3 commit 65ab240
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/integration/targets/connection_docker/aliases
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
shippable/posix/group4
skip/docker # coverage does not work if we're inside a docker container, since we cannot access this container's /tmp dir from the new container
destructive
8 changes: 6 additions & 2 deletions tests/integration/targets/connection_docker/runme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ trap cleanup INT TERM EXIT

echo "Start containers"
for CONTAINER in ${DOCKER_CONTAINERS}; do
docker run --rm --name ${CONTAINER} --detach ${IMAGE} /bin/sh -c 'sleep 10m'
docker exec ${CONTAINER} pip3 install coverage
if [ "${ANSIBLE_TEST_COVERAGE}" == "" ]; then
docker run --rm --name ${CONTAINER} --detach ${IMAGE} /bin/sh -c 'sleep 10m'
else
docker run --rm --name ${CONTAINER} --detach -v /tmp:/tmp ${IMAGE} /bin/sh -c 'sleep 10m'
docker exec ${CONTAINER} pip3 install coverage
fi
echo ${CONTAINER}
done

Expand Down

0 comments on commit 65ab240

Please sign in to comment.