tests: add test to prove Dokku respects the Procfile when deploying from an image
Any subsequent ps:rebuild should always respect the image for fetching files. This test proves this works. Closes #7375
This commit is contained in:
@@ -22,7 +22,6 @@ trigger-git-git-from-image() {
|
|||||||
rsync -a "$BUILD_DIR/" "$TMP_WORK_DIR"
|
rsync -a "$BUILD_DIR/" "$TMP_WORK_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dokku_log_verbose "Setting Dockerfile"
|
|
||||||
touch "$TMP_WORK_DIR/Dockerfile"
|
touch "$TMP_WORK_DIR/Dockerfile"
|
||||||
echo "FROM $DOCKER_IMAGE" >>"$TMP_WORK_DIR/Dockerfile"
|
echo "FROM $DOCKER_IMAGE" >>"$TMP_WORK_DIR/Dockerfile"
|
||||||
echo "LABEL com.dokku.docker-image-labeler/alternate-tags=[\\\"$DOCKER_IMAGE\\\"]" >>"$TMP_WORK_DIR/Dockerfile"
|
echo "LABEL com.dokku.docker-image-labeler/alternate-tags=[\\\"$DOCKER_IMAGE\\\"]" >>"$TMP_WORK_DIR/Dockerfile"
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ trigger-scheduler-docker-local-scheduler-deploy() {
|
|||||||
trap '' INT HUP
|
trap '' INT HUP
|
||||||
sleep "$DOKKU_WAIT_TO_RETIRE"
|
sleep "$DOKKU_WAIT_TO_RETIRE"
|
||||||
for oldid in $oldids; do
|
for oldid in $oldids; do
|
||||||
if ! docker container inspect "$oldid" &>/dev/null; then
|
if ! "$DOCKER_BIN" container inspect "$oldid" &>/dev/null; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# Disable the container restart policy
|
# Disable the container restart policy
|
||||||
|
|||||||
@@ -94,3 +94,15 @@ EOF
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_output "3001/udp 3000/tcp 3003"
|
assert_output "3001/udp 3000/tcp 3003"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(builder-dockerfile) ps:rebuild fetches files from image" {
|
||||||
|
run /bin/bash -c "dokku --trace git:from-image $TEST_APP dokku/smoke-test-app:dockerfile"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku ps:rebuild $TEST_APP"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user