Merge pull request #204 from mesosphere/master
Add meaningful Travis CI integration and integration tests
This commit is contained in:
4 files changed
+23
-10
No files matched your search
+2
-9
@@ -1,9 +1,2 @@
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- DOCKER_TAG=travisci make -f Makefile.docker image
|
||||
# make sure image can run
|
||||
- docker run -e LOG_TO_SYSLOG=0 -v /var/run/docker.sock:/var/run/docker.sock spotify/docker-gc:travisci
|
||||
language: generic
|
||||
script: sudo ./tests/run-tests.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
# docker-gc
|
||||
# docker-gc [](https://travis-ci.org/mesosphere/docker-gc)
|
||||
|
||||
* [Building](#building)
|
||||
* [Installing](#installing)
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in $(dirname $0)/test-*.sh ; do
|
||||
echo "Running ${i}..."
|
||||
${i}
|
||||
done
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Regression test for https://github.com/spotify/docker-gc/issues/201
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# when no volume exists then docker-gc should exit with status 0
|
||||
REMOVE_VOLUMES=1 ./docker-gc
|
||||
|
||||
# when a volume exists it should be removed
|
||||
docker volume create
|
||||
if [[ $(docker volume ls --format "{{.Name}}" | wc -l) != 1 ]] ; then echo "Volume count is not 1" && exit 1 ; fi
|
||||
REMOVE_VOLUMES=1 ./docker-gc
|
||||
if [[ $(docker volume ls --format "{{.Name}}" | wc -l) != 0 ]] ; then echo "Volume has not been removed" && exit 1 ; fi
|
||||
Reference in new issue
Block a user