From de65747523b0e5c589c2c9e21435e37b31dcba98 Mon Sep 17 00:00:00 2001 From: Vadim Gedz Date: Tue, 20 Jun 2023 11:49:54 +0300 Subject: [PATCH] fix: return required load to test.bats --- .gitmodules | 3 +++ test/test.bats | 7 +++++++ test/test_helper/bats-support | 1 + 3 files changed, 11 insertions(+) create mode 160000 test/test_helper/bats-support diff --git a/.gitmodules b/.gitmodules index ee3186b..2301d73 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "test/test_helper/bats-assert"] path = test/test_helper/bats-assert url = https://github.com/bats-core/bats-assert.git +[submodule "test/test_helper/bats-support"] + path = test/test_helper/bats-support + url = https://github.com/bats-core/bats-support.git diff --git a/test/test.bats b/test/test.bats index 7b23948..e3631f4 100644 --- a/test/test.bats +++ b/test/test.bats @@ -1,6 +1,7 @@ #!/usr/bin/env bats setup() { + load 'test_helper/bats-support/load' load 'test_helper/bats-assert/load' } @@ -53,3 +54,9 @@ EOF assert_output "${expected_output}" } + +@test "script should fail to get the non-existing secret with reasonable error " { + run ./src/kd.sh non-existing-secret + + assert_output --partial "Error: Unable to get secret non-existing-secret in namespace default" +} diff --git a/test/test_helper/bats-support b/test/test_helper/bats-support new file mode 160000 index 0000000..3c8fadc --- /dev/null +++ b/test/test_helper/bats-support @@ -0,0 +1 @@ +Subproject commit 3c8fadc5097c9acfc96d836dced2bb598e48b009