tests: enhance release tests to check global secrets
This commit is contained in:
1 parent
7bf61b401f
commit
620a36be82
2 files changed
+5
No files matched your search
@@ -3,6 +3,7 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
print("GLOBAL_SECRET: {0}".format(os.getenv('GLOBAL_SECRET')))
|
||||||
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
|
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ teardown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "(app-json) app.json herokuish release" {
|
@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"
|
run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
@@ -83,10 +84,12 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output_contains '"GLOBAL_SECRET": "fjdkslafjdk"'
|
||||||
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(app-json) app.json cnb release" {
|
@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"
|
run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
@@ -103,6 +106,7 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output_contains '"GLOBAL_SECRET": "fjdkslafjdk"'
|
||||||
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user