Skip to content
Open
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line kinda redundant?

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