feat: add a deployment task test for cnb
This commit is contained in:
1 parent
0673fdff2d
commit
123fbea7c0
4 files changed
+32
-1
No files matched your search
@@ -7,7 +7,7 @@ cron: python3 worker.py
|
|||||||
web: python3 web.py # testing inline comment
|
web: python3 web.py # testing inline comment
|
||||||
worker: python3 worker.py
|
worker: python3 worker.py
|
||||||
custom: echo -n
|
custom: echo -n
|
||||||
release: touch /app/release.test
|
release: python3 release.py
|
||||||
|
|
||||||
|
|
||||||
# Old version with separate processes (use this if you have issues with the threaded version)
|
# Old version with separate processes (use this if you have issues with the threaded version)
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
flask
|
||||||
@@ -103,3 +103,23 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(app-json) app.json cnb release" {
|
||||||
|
run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run deploy_app python dokku@dokku.me:$TEST_APP add_requirements_txt
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output_contains "Executing release task from Procfile"
|
||||||
|
assert_output_contains "SECRET_KEY: fjdkslafjdk"
|
||||||
|
|
||||||
|
run /bin/bash -c "curl $(dokku url $TEST_APP)/env"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||||
|
}
|
||||||
Reference in new issue
Block a user