Skip to content

Commit

Permalink
upgrade tests/tor.bats for deleteall and destroy (fixes #2211)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Apr 19, 2021
1 parent d8ba03f commit 4a67094
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tor.bats
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ load test-helper
}

@test "$clinom tor add 22" {
run "${clicmd}" tor add 22
run "${clicmd}" tor add 22
assert_success && assert_output -p 'Success'
}
Expand All @@ -56,3 +57,17 @@ load test-helper
run "${clicmd}" tor notice now
assert_success && assert_output -p 'Thanks'
}

@test "$clinom tor deleteall" {
run "${clicmd}" tor add 22
run "${clicmd}" tor deleteall
assert_success && assert_output -p 'All ports have been deleted'
}

@test "$clinom tor destroy" {
run "${clicmd}" tor add 22
run "${clicmd}" tor start
sleep 5
run "${clicmd}" tor destroy
assert_success && assert_output -p 'Success: the tor service has been destroyed'
}

0 comments on commit 4a67094

Please sign in to comment.