mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
tests: add test for ensuring run commands work with pack-based builds
Closes #7863
This commit is contained in:
@@ -18,7 +18,7 @@ trigger-builder-pack-builder-build() {
|
||||
DOKKU_CNB_BUILDER="$stack"
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Building $APP from cnb stack $DOKKU_CNB_BUILDER (experimental)..."
|
||||
dokku_log_info1 "Building $APP from cnb stack $DOKKU_CNB_BUILDER..."
|
||||
|
||||
if ! command -v "pack" &>/dev/null; then
|
||||
dokku_log_fail "Missing pack, install it"
|
||||
|
||||
@@ -74,6 +74,27 @@ teardown() {
|
||||
assert_output_contains 'Installing dependencies using pip'
|
||||
}
|
||||
|
||||
@test "(builder-pack) run" {
|
||||
run /bin/bash -c "dokku builder:set $TEST_APP selected pack"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run deploy_app python dokku@$DOKKU_DOMAIN:$TEST_APP initialize_for_cnb
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains 'from cnb stack'
|
||||
assert_output_contains 'Building with buildpack 1' 0
|
||||
assert_output_contains 'Installing dependencies using pip'
|
||||
|
||||
run /bin/bash -c "dokku run $TEST_APP python task.py test"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "['task.py', 'test']"
|
||||
}
|
||||
|
||||
@test "(builder-pack) git:from-image without a Procfile" {
|
||||
run /bin/bash -c "dokku git:from-image $TEST_APP dokku/smoke-test-gradle-app:1"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user