Files
kubectx/test/kubens.bats
Ahmet Alp Balkan 845f3b690b test: enable travis-ci with bats (#108)
- 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>
2018-12-22 13:22:08 -08:00

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 ]
}