tests: removed the default -d argument from create_basic_container function

This commit is contained in:
Sameer Naik
2015-09-09 19:31:03 +05:30
parent 44f091258b
commit 3928f922f4

View File

@@ -32,7 +32,7 @@ cleanup_volumes_content() {
}
create_basic_container(){
docker run -d "$@" $IMAGE_NAME; sleep $SLEEP_TIME
docker run "$@" $IMAGE_NAME; sleep $SLEEP_TIME
}
# $1 is the command
@@ -61,7 +61,7 @@ create_full_container_mounted(){
}
@test "Root user created without password" {
create_basic_container --name $CONTAINER_NAME
create_basic_container -d --name $CONTAINER_NAME
run mysql_client -e "select User from mysql.user where User=\"root\"\G"
[[ "$output" =~ "User: root" ]]
}
@@ -77,7 +77,7 @@ create_full_container_mounted(){
}
@test "Root user has access to admin database" {
create_basic_container --name $CONTAINER_NAME
create_basic_container -d --name $CONTAINER_NAME
run mysql_client -e 'show databases\G'
[[ "$output" =~ 'Database: mysql' ]]
}
@@ -148,7 +148,7 @@ create_full_container_mounted(){
}
@test "Port 3306 exposed and accepting external connections" {
create_basic_container --name $CONTAINER_NAME
create_basic_container -d --name $CONTAINER_NAME
run docker run --rm --name 'linked' --link $CONTAINER_NAME:$CONTAINER_NAME $IMAGE_NAME\
mysql -h $CONTAINER_NAME -P 3306 -e 'show databases\G'
@@ -156,7 +156,7 @@ create_full_container_mounted(){
}
@test "All the volumes exposed" {
create_basic_container --name $CONTAINER_NAME
create_basic_container -d --name $CONTAINER_NAME
run docker inspect $CONTAINER_NAME
[[ "$output" =~ "$VOL_PREFIX/data" ]]
[[ "$output" =~ "$VOL_PREFIX/conf" ]]