From 9d6da109e875880377b762d53c24c33465ec2959 Mon Sep 17 00:00:00 2001 From: Ajay Kidave Date: Sat, 12 Oct 2024 13:14:43 -0700 Subject: [PATCH] Added tests for create error and params --- tests/commander/test_domains.yaml | 44 +++++++++++++++++++++++++++++++ tests/run_cli_tests.sh | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/tests/commander/test_domains.yaml b/tests/commander/test_domains.yaml index b0435e2..035b654 100644 --- a/tests/commander/test_domains.yaml +++ b/tests/commander/test_domains.yaml @@ -60,3 +60,47 @@ tests: secret0330: command: curl -su "admin:qwerty" localhost:25222/secret2 stdout: unknown secret provider vault + + # Test errors + createerror0100: + command: ../clace app create --approve ./env_app /test/../test1 + stderr: path cannot contain + exit-code: 1 + createerror0200: + command: ../clace app create --approve ./env_app ../test1 + stderr: path cannot contain + exit-code: 1 + createerror0300: + command: ../clace app create --approve ./env_app /test/./test1 + stderr: path cannot contain + exit-code: 1 + createerror0400: + command: ../clace app create --approve ./env_app /test/. + stderr: path cannot end with + exit-code: 1 + createerror0500: + command: ../clace app create --approve ./env_app /test_cl_abc + stderr: clace reserved path + exit-code: 1 + + # Test params + param0100: + command: ../clace app create --approve ./testapp /test_param1 + param0110: + command: ../clace param list /test_param1 + stdout: No param values + param0130: + command: ../clace param update --promote abc xyz /test_param1 + param0140: + command: ../clace param list /test_param1 + stdout: xyz + param0150: + command: ../clace param update --promote abc aaa /test_param1 + param0160: + command: ../clace param list /test_param1 + stdout: aaa + param0170: + command: ../clace param update --promote abc - /test_param1 + param0180: + command: ../clace param list /test_param1 + stdout: No param values diff --git a/tests/run_cli_tests.sh b/tests/run_cli_tests.sh index 079de4a..596510b 100755 --- a/tests/run_cli_tests.sh +++ b/tests/run_cli_tests.sh @@ -1,4 +1,4 @@ -set -x +#set -x set -e # Enabling verbose is useful for debugging but the commander command seems to