Skip to content

Commit

Permalink
banman: Added test for Unban feature
Browse files Browse the repository at this point in the history
Signed-off-by: Maureen Ononiwu <amaka013@gmail.com>
  • Loading branch information
Chinwendu20 committed Aug 22, 2023
1 parent a68a32b commit 2618671
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions banman/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,11 @@ func TestBanStore(t *testing.T) {
// We'll query for second IP network again as it should now be unknown
// to the BanStore. We should expect not to find anything regarding it.
checkBanStore(ipNet2, false, 0, 0)

//Unban ipNet1
err = banStore.UnbanIPNet(ipNet1)

//IpNet1 should be unknown to the BanStore
checkBanStore(ipNet1, false, 0, 0)

}

0 comments on commit 2618671

Please sign in to comment.