tests: enhance release tests to check global secrets
This commit is contained in:
@@ -3,6 +3,7 @@ import os
|
||||
|
||||
|
||||
def main():
|
||||
print("GLOBAL_SECRET: {0}".format(os.getenv('GLOBAL_SECRET')))
|
||||
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(app-json) app.json herokuish release" {
|
||||
run /bin/bash -c "dokku config:set --no-restart --global GLOBAL_SECRET=fjdkslafjdk"
|
||||
run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -83,10 +84,12 @@ teardown() {
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains '"GLOBAL_SECRET": "fjdkslafjdk"'
|
||||
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||
}
|
||||
|
||||
@test "(app-json) app.json cnb release" {
|
||||
run /bin/bash -c "dokku config:set --no-restart --global GLOBAL_SECRET=fjdkslafjdk"
|
||||
run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -103,6 +106,7 @@ teardown() {
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains '"GLOBAL_SECRET": "fjdkslafjdk"'
|
||||
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user