Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions tests/help.bats
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ setup() {
load 'test_helper/bats-support/load'
load 'test_helper/bats-assert/load'
export NO_COLOR=1
EXPECTED_VERSION="$(tr -d '\r\n' < ../version.txt)"
EXPECTED_BRANCH="$(tr -d '\r\n' < ../branch.txt)"
ops -reset force
cd ..
}
Expand All @@ -36,10 +38,10 @@ setup() {
run ops -help
assert_line "Tools (use -<tool> -h for help):"

run ops -v
assert_line --partial "0.1.0"
run ops -version
assert_line --partial "0.1.0"
run ops -v
assert_line "$EXPECTED_VERSION"
run ops -version
assert_line "$EXPECTED_VERSION"

run ops action --help
assert_line --partial "ops action [command]"
Expand Down Expand Up @@ -69,10 +71,10 @@ setup() {

run ops -i
assert_success
assert_line --partial OPS_VERSION: 0.1.0
assert_line "OPS_BRANCH: 0.1.0"
assert_line "OPS_VERSION: $EXPECTED_VERSION"
assert_line "OPS_BRANCH: $EXPECTED_BRANCH"
run ops -info
assert_line --partial OPS_VERSION: 0.1.0
assert_line "OPS_VERSION: $EXPECTED_VERSION"

run ops -u
assert_success
Expand All @@ -96,4 +98,3 @@ setup() {
assert_line "ops -config [options] [KEY | KEY=VALUE [KEY=VALUE ...]]"

}

Loading