diff --git a/scripts/integration.sh b/scripts/integration.sh index 3c672f5..0595aa1 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -65,6 +65,9 @@ fi network_id=$(docker network create --internal "$network") require_free_docker_name image "$image" docker build --target integration --file dockerfile --tag "$image" --iidfile "$tmp/image-id" . +tests_id=$(docker create --name "$tests" --network "$network_id" \ + --env IT_GALERA="$IT_GALERA" --env IT_MYSQL_HOST=mysql --env IT_MYSQL_PORT=3306 --env IT_MYSQL_ROOT_PASSWORD="$root_password" \ + "$(cat "$tmp/image-id")") set -- if [ "$IT_GALERA" = 1 ]; then set -- --wsrep-on=ON --wsrep-provider=/usr/lib/galera/libgalera_smm.so \ @@ -86,7 +89,4 @@ until docker exec --env MYSQL_PWD="$root_password" "$mysql_id" sh -c ' fi sleep 1 done -tests_id=$(docker create --name "$tests" --network "$network_id" \ - --env IT_GALERA="$IT_GALERA" --env IT_MYSQL_HOST=mysql --env IT_MYSQL_PORT=3306 --env IT_MYSQL_ROOT_PASSWORD="$root_password" \ - "$(cat "$tmp/image-id")") docker start --attach "$tests_id"