mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
tests: add test for procfile-path
This commit is contained in:
@@ -6,3 +6,4 @@
|
||||
cron: node worker.js
|
||||
web: node web.js
|
||||
worker: node worker.js
|
||||
release: node release.js
|
||||
|
||||
3
tests/apps/dockerfile-procfile/release.js
Normal file
3
tests/apps/dockerfile-procfile/release.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var secret = process.env.SECRET_KEY || "";
|
||||
|
||||
console.log('SECRET_KEY: ' + secret);
|
||||
8
tests/apps/dockerfile-procfile/second.Procfile
Normal file
8
tests/apps/dockerfile-procfile/second.Procfile
Normal file
@@ -0,0 +1,8 @@
|
||||
###############################
|
||||
# DEVELOPMENT #
|
||||
###############################
|
||||
|
||||
# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
|
||||
cron: node worker.js
|
||||
web: node web.js
|
||||
worker: node worker.js
|
||||
1
tests/apps/python/second.Procfile
Normal file
1
tests/apps/python/second.Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: python3 web.py
|
||||
@@ -198,3 +198,44 @@ EOF
|
||||
assert_success
|
||||
assert_output_contains "bar"
|
||||
}
|
||||
|
||||
|
||||
@test "(ps:set) procfile-path" {
|
||||
run deploy_app dockerfile-procfile
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP procfile-path nonexistent-procfile"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku ps:rebuild $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
assert_output_contains "Could not start due to"
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP procfile-path second.Procfile"
|
||||
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
|
||||
assert_output_contains 'SECRET_KEY:' 0
|
||||
|
||||
run /bin/bash -c "dokku ps:set $TEST_APP procfile-path"
|
||||
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
|
||||
assert_output_contains 'SECRET_KEY:'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user