Skip to content

Commit

Permalink
fix: return required load to test.bats
Browse files Browse the repository at this point in the history
  • Loading branch information
shini4i committed Jun 20, 2023
1 parent 476639f commit de65747
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions test/test.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bats

setup() {
load 'test_helper/bats-support/load'
load 'test_helper/bats-assert/load'
}

Expand Down Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions test/test_helper/bats-support
Submodule bats-support added at 3c8fad

0 comments on commit de65747

Please sign in to comment.