From 26186716d18026de804d9b3bb7741f1d6c944885 Mon Sep 17 00:00:00 2001 From: Maureen Ononiwu Date: Tue, 22 Aug 2023 12:47:43 +0100 Subject: [PATCH] banman: Added test for Unban feature Signed-off-by: Maureen Ononiwu --- banman/store_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/banman/store_test.go b/banman/store_test.go index e4b5f8c4..e1accea9 100644 --- a/banman/store_test.go +++ b/banman/store_test.go @@ -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) + }