tests: add test for app-json:set
This commit is contained in:
1 parent
5901c57bde
commit
0ab135b034
3 files changed
+35
-1
No files matched your search
@@ -24,6 +24,6 @@ func CommandReport(appName string, format string, infoFlag string) error {
|
|||||||
|
|
||||||
// CommandSet set or clear a builder property for an app
|
// CommandSet set or clear a builder property for an app
|
||||||
func CommandSet(appName string, property string, value string) error {
|
func CommandSet(appName string, property string, value string) error {
|
||||||
common.CommandPropertySet("builder", appName, property, value, DefaultProperties, GlobalProperties)
|
common.CommandPropertySet("app-json", appName, property, value, DefaultProperties, GlobalProperties)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"dokku": {
|
||||||
|
"predeploy": "touch /app/predeploy2.test",
|
||||||
|
"postdeploy": "touch /app/postdeploy.test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -151,3 +151,29 @@ teardown() {
|
|||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(app-json:set)" {
|
||||||
|
run /bin/bash -c "dokku app-json:set $TEST_APP appjson-path app2.json"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run deploy_app python
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
assert_output_contains "touch /app/predeploy2.test"
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku app-json:set $TEST_APP appjson-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 "touch /app/predeploy.test"
|
||||||
|
assert_output_contains "touch /app/predeploy2.test" 0
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user