Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZZROTDesign/docker-clean
Browse files Browse the repository at this point in the history
merging remote changes
* 'master' of github.com:ZZROTDesign/docker-clean:
  Changed testing order back
  • Loading branch information
killianbrackey committed Apr 25, 2016
2 parents 3820b26 + 274962a commit 5286164
Showing 1 changed file with 17 additions and 34 deletions.
51 changes: 17 additions & 34 deletions batsTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@
@test "Check that docker client is available" {
command -v docker
}
@test "Restart function" {
operating_system=$(testOS)
if [[ $operating_system =~ "mac" || $operating_system =~ 'windows' ]]; then
./docker-clean -a | grep 'started'
run docker ps &>/dev/null
[ $status = 0 ]
elif [[ $operating_system =~ "linux" ]]; then
./docker-clean -a | grep 'stop'
#ps -e | grep 'docker'

run docker ps &>/dev/null
[ $status = 0 ]
else
echo "Operating system not valid"
[[ false ]]
fi
}

@test "Run docker ps (check daemon connectivity)" {
run docker ps
Expand Down Expand Up @@ -186,23 +169,23 @@
clean
}
# Testing for successful restart
#@test "Restart function" {
# operating_system=$(testOS)
# if [[ $operating_system =~ "mac" || $operating_system =~ 'windows' ]]; then
# ./docker-clean -a | grep 'started'
# run docker ps &/dev/null
# [ $status = 0 ]
# elif [[ $operating_system =~ "linux" ]]; then
# ./docker-clean -a | grep 'stop'
# #ps -e | grep 'docker'
#
# run docker ps &>/dev/null
# [ $status = 0 ]
# else
# echo "Operating system not valid"
# [[ false ]]
# fi
#}
@test "Restart function" {
operating_system=$(testOS)
if [[ $operating_system =~ "mac" || $operating_system =~ 'windows' ]]; then
./docker-clean -a | grep 'started'
run docker ps &>/dev/null
[ $status = 0 ]
elif [[ $operating_system =~ "linux" ]]; then
./docker-clean -a | grep 'stop'
#ps -e | grep 'docker'

run docker ps &>/dev/null
[ $status = 0 ]
else
echo "Operating system not valid"
[[ false ]]
fi
}

# Helper FUNCTIONS

Expand Down

0 comments on commit 5286164

Please sign in to comment.