mirror of
https://github.com/ahmetb/kubectx.git
synced 2026-03-18 11:52:24 +00:00
- add .travis.yml. - move bats fixtures to .bats extension, since it allows detection of test files automatically by file extension. - use BATS_TEST_DIRNAME variable to compute location of COMMAND. - IMPORTANT: use `echo "$output">&2` before final check so that we can debug the test cases by their output Ref #2. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
16 lines
258 B
Bash
16 lines
258 B
Bash
#!/usr/bin/env bats
|
|
|
|
COMMAND="${BATS_TEST_DIRNAME}/../kubens"
|
|
|
|
@test "--help should not fail" {
|
|
run ${COMMAND} --help
|
|
echo "$output">&2
|
|
[ "$status" -eq 0 ]
|
|
}
|
|
|
|
@test "-h should not fail" {
|
|
run ${COMMAND} -h
|
|
echo "$output">&2
|
|
[ "$status" -eq 0 ]
|
|
}
|