Merge pull request #204 from mesosphere/master

Add meaningful Travis CI integration and integration tests
This commit is contained in:
David Xia authored and GitHub committed 2019-06-12 11:01:25 -04:00
commit 1543fc22e4
4 files changed
+23 -10

No files matched your search

+2 -9
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
# docker-gc
# docker-gc [![Build Status](https://travis-ci.org/mesosphere/docker-gc.svg?branch=master)](https://travis-ci.org/mesosphere/docker-gc)
* [Building](#building)
* [Installing](#installing)
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
for i in $(dirname $0)/test-*.sh ; do
echo "Running ${i}..."
${i}
done
+14
View File
@@ -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