Skip to content

Commit

Permalink
Fix failed tests (partially): Ignore case when letters are created by…
Browse files Browse the repository at this point in the history
… libraries (#22)

* Ignore case if letters are created by libraries

* Turn off nocasematch every test is done
  • Loading branch information
ihcomega56 committed Dec 7, 2022
1 parent 435daa4 commit f0f581f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions bats/tests/pyrsia_cli.bats
Expand Up @@ -24,23 +24,26 @@ setup() {
}

teardown() {
shopt -u nocasematch
run "$PYRSIA_CLI" config edit --host localhost --port 7888 --diskspace "10 GB"
}

@test "Testing 'pyrsia help' CLI, check if the help is shown." {
# ignore case in this @test
shopt -s nocasematch
# run pyrsia help
run "$PYRSIA_CLI" help
# check if pyrsia help is shown
assert_output --partial 'USAGE:'
assert_output --partial 'OPTIONS:'
assert_output --partial 'SUBCOMMANDS:'
assert_output --partial 'Usage:'
assert_output --partial 'Commands:'
assert_output --partial 'Options:'

# run pyrsia help
run "$PYRSIA_CLI" -h
# check if pyrsia help is shown
assert_output --partial 'USAGE:'
assert_output --partial 'OPTIONS:'
assert_output --partial 'SUBCOMMANDS:'
assert_output --partial 'Usage:'
assert_output --partial 'Commands:'
assert_output --partial 'Options:'
}

@test "Testing 'pyrsia ping' CLI, check if the node is up and reachable." {
Expand Down

0 comments on commit f0f581f

Please sign in to comment.