fix: update test to fix case where intermediate containers are now immediately removed
This commit is contained in:
1 parent
18c54d39c0
commit
c7e1f2d380
1 file changed
+5
-5
@@ -20,6 +20,9 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output_contains "Executing predeploy task from app.json: touch /app/predeploy.test"
|
||||||
|
assert_output_contains "Executing postdeploy task from app.json: touch /app/postdeploy.test"
|
||||||
|
assert_output_contains "Executing prebuild task from app.json: touch /app/prebuild.test" 0
|
||||||
|
|
||||||
run docker inspect "${TEST_APP}.web.1" --format "{{json .Config.Cmd}}"
|
run docker inspect "${TEST_APP}.web.1" --format "{{json .Config.Cmd}}"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
@@ -37,13 +40,10 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
CID=$(docker ps -a -q -f "ancestor=dokku/${TEST_APP}" -f "label=dokku_phase_script=postdeploy")
|
run /bin/bash -c "dokku run $TEST_APP ls /app/postdeploy.test"
|
||||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$TEST_APP")
|
|
||||||
IMAGE_ID=$(docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID dokku-test/${TEST_APP})
|
|
||||||
run /bin/bash -c "docker run --rm $IMAGE_ID ls /app/postdeploy.test"
|
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_failure
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(app-json) app.json scripts postdeploy" {
|
@test "(app-json) app.json scripts postdeploy" {
|
||||||
|
|||||||
Reference in new issue
Block a user