From a167f295aa1f7eafdb574dff7d1546360873295c Mon Sep 17 00:00:00 2001 From: Siak Hooi <73884114+siakhooi@users.noreply.github.com> Date: Thu, 18 Apr 2024 00:54:14 +0000 Subject: [PATCH] bats - update shed-kubectl-exec-sh usage --- tests/bats-test-scripts/shed-kubectl-exec-sh/k-sh.bats | 10 ++++++++++ .../shed-kubectl-exec-sh/shed-kubectl-exec-sh.bats | 10 ++++++++++ .../shed-kubectl-exec-sh/shed_kubectl-exec-sh.bats | 10 ++++++++++ .../shed-kubectl-exec-sh/usage.expected | 1 + 4 files changed, 31 insertions(+) create mode 100644 tests/bats-test-scripts/shed-kubectl-exec-sh/usage.expected diff --git a/tests/bats-test-scripts/shed-kubectl-exec-sh/k-sh.bats b/tests/bats-test-scripts/shed-kubectl-exec-sh/k-sh.bats index ca1ebce..cfe65d1 100644 --- a/tests/bats-test-scripts/shed-kubectl-exec-sh/k-sh.bats +++ b/tests/bats-test-scripts/shed-kubectl-exec-sh/k-sh.bats @@ -2,6 +2,16 @@ setup(){ load '../common-setup' common_setup } +@test "k-sh" { + run bash -ic 'k-sh' + assert_success + cat_expected "usage" | assert_output - +} +@test "k-sh xxx yyy zzz" { + run bash -ic 'k-sh xxx yyy zzz' + assert_success + cat_expected "usage" | assert_output - +} @test "k-sh xxx" { run bash -ic 'k-sh xxx' assert_failure 1 diff --git a/tests/bats-test-scripts/shed-kubectl-exec-sh/shed-kubectl-exec-sh.bats b/tests/bats-test-scripts/shed-kubectl-exec-sh/shed-kubectl-exec-sh.bats index 282c6f2..0e17539 100644 --- a/tests/bats-test-scripts/shed-kubectl-exec-sh/shed-kubectl-exec-sh.bats +++ b/tests/bats-test-scripts/shed-kubectl-exec-sh/shed-kubectl-exec-sh.bats @@ -2,6 +2,16 @@ setup(){ load '../common-setup' common_setup } +@test "shed-kubectl-exec-sh" { + run shed-kubectl-exec-sh + assert_success + cat_expected "usage" | assert_output - +} +@test "shed-kubectl-exec-sh xxx yyy zzz" { + run shed-kubectl-exec-sh xxx yyy zzz + assert_success + cat_expected "usage" | assert_output - +} @test "shed-kubectl-exec-sh xxx" { run shed-kubectl-exec-sh xxx assert_failure 1 diff --git a/tests/bats-test-scripts/shed-kubectl-exec-sh/shed_kubectl-exec-sh.bats b/tests/bats-test-scripts/shed-kubectl-exec-sh/shed_kubectl-exec-sh.bats index e08552b..3857dfb 100644 --- a/tests/bats-test-scripts/shed-kubectl-exec-sh/shed_kubectl-exec-sh.bats +++ b/tests/bats-test-scripts/shed-kubectl-exec-sh/shed_kubectl-exec-sh.bats @@ -2,6 +2,16 @@ setup(){ load '../common-setup' common_setup } +@test "shed kubectl-exec-sh" { + run shed kubectl-exec-sh + assert_success + cat_expected "usage" | assert_output - +} +@test "shed kubectl-exec-sh xxx yyy zzz" { + run shed kubectl-exec-sh xxx yyy zzz + assert_success + cat_expected "usage" | assert_output - +} @test "shed kubectl-exec-sh xxx" { run shed kubectl-exec-sh xxx assert_failure 1 diff --git a/tests/bats-test-scripts/shed-kubectl-exec-sh/usage.expected b/tests/bats-test-scripts/shed-kubectl-exec-sh/usage.expected new file mode 100644 index 0000000..78ed9ca --- /dev/null +++ b/tests/bats-test-scripts/shed-kubectl-exec-sh/usage.expected @@ -0,0 +1 @@ +Usage: shed-kubectl-exec-sh (pod | type/name) [container]