@@ -21,14 +21,14 @@ func (s *CacheEntriesTestSuite) SetupSuite() {
21
21
}
22
22
23
23
func (s * CacheEntriesTestSuite ) TestGetUnexpiredCacheEntries () {
24
- entries , err := GetUnexpiredBlacklistEntries (context .Background ())
24
+ entries , err := GetUnexpiredDenylistEntries (context .Background ())
25
25
require .Nil (s .T (), err )
26
26
origEntries := len (entries )
27
27
28
28
entryDate := time .Now ().Add (time .Minute * - 5 ).UnixNano ()
29
29
expiration := time .Now ().Add (time .Minute * 5 ).UnixNano ()
30
- e1 := BlacklistEntry {Key : "key1" , EntryDate : entryDate , CacheExpiration : expiration }
31
- e2 := BlacklistEntry {Key : "key2" , EntryDate : entryDate , CacheExpiration : expiration }
30
+ e1 := DenylistEntry {Key : "key1" , EntryDate : entryDate , CacheExpiration : expiration }
31
+ e2 := DenylistEntry {Key : "key2" , EntryDate : entryDate , CacheExpiration : expiration }
32
32
33
33
if err = s .db .Save (& e1 ).Error ; err != nil {
34
34
assert .FailNow (s .T (), err .Error ())
@@ -37,7 +37,7 @@ func (s *CacheEntriesTestSuite) TestGetUnexpiredCacheEntries() {
37
37
assert .FailNow (s .T (), err .Error ())
38
38
}
39
39
40
- entries , err = GetUnexpiredBlacklistEntries (context .Background ())
40
+ entries , err = GetUnexpiredDenylistEntries (context .Background ())
41
41
assert .Nil (s .T (), err )
42
42
assert .True (s .T (), len (entries ) == origEntries + 2 )
43
43
@@ -47,14 +47,14 @@ func (s *CacheEntriesTestSuite) TestGetUnexpiredCacheEntries() {
47
47
assert .Nil (s .T (), err )
48
48
}
49
49
50
- func (s * CacheEntriesTestSuite ) TestCreateBlacklistEntryEmptyKey () {
50
+ func (s * CacheEntriesTestSuite ) TestCreateDenylistEntryEmptyKey () {
51
51
entryDate := time .Now ().Add (time .Minute * - 5 )
52
52
expiration := time .Now ().Add (time .Minute * 5 )
53
53
54
- _ , err := CreateBlacklistEntry (context .Background (), "" , entryDate , expiration )
54
+ _ , err := CreateDenylistEntry (context .Background (), "" , entryDate , expiration )
55
55
assert .NotNil (s .T (), err )
56
56
57
- e , err := CreateBlacklistEntry (context .Background (), "another_key" , entryDate , expiration )
57
+ e , err := CreateDenylistEntry (context .Background (), "another_key" , entryDate , expiration )
58
58
assert .Nil (s .T (), err )
59
59
assert .Equal (s .T (), "another_key" , e .Key )
60
60
0 commit comments