Browse Source

If an image we're trying to test doesn't exist, skip it instead of having "pulling" output mixed in with the tests and borking things up

Tianon Gravi 10 years ago
parent
commit
a2006fc0b1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      test/run.sh

+ 5 - 0
test/run.sh

@@ -53,6 +53,11 @@ done
 for dockerImage in "$@"; do
 for dockerImage in "$@"; do
 	echo "testing $dockerImage"
 	echo "testing $dockerImage"
 	
 	
+	if ! docker inspect "$dockerImage" &> /dev/null; then
+		echo $'\timage does not exist!'
+		continue
+	fi
+	
 	noNamespace="${dockerImage##*/}"
 	noNamespace="${dockerImage##*/}"
 	repo="${noNamespace%:*}"
 	repo="${noNamespace%:*}"
 	tagVar="${noNamespace#*:}"
 	tagVar="${noNamespace#*:}"