mirror of
https://github.com/bitnami/containers.git
synced 2026-03-20 14:58:20 +08:00
tests: removed the default -d argument from create_basic_container function
This commit is contained in:
@@ -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" ]]
|
||||
|
||||
Reference in New Issue
Block a user