@@ -16,7 +16,7 @@ const cachingPeriod = time.Second
1616func TestValidate_PeerNotRecognized_NoApplications (t * testing.T ) {
1717 policy := & anyApplicationPolicy {
1818 applications : []Application {},
19- allowList : EmptyAllowList ,
19+ allowList : EmptyAllowList () ,
2020 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
2121 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
2222 }
@@ -44,7 +44,7 @@ func TestValidate_PeerNotRecognized_MultipleApplications(t *testing.T) {
4444 applications : []Application {
4545 newMockApplication (),
4646 newMockApplication ()},
47- allowList : EmptyAllowList ,
47+ allowList : EmptyAllowList () ,
4848 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
4949 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
5050 }
@@ -71,7 +71,7 @@ func TestValidate_PeerRecognized_FirstApplicationRecognizes(t *testing.T) {
7171 applications : []Application {
7272 application ,
7373 newMockApplication ()},
74- allowList : EmptyAllowList ,
74+ allowList : EmptyAllowList () ,
7575 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
7676 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
7777 }
@@ -100,7 +100,7 @@ func TestValidate_PeerRecognized_SecondApplicationRecognizes(t *testing.T) {
100100 applications : []Application {
101101 newMockApplication (),
102102 application },
103- allowList : EmptyAllowList ,
103+ allowList : EmptyAllowList () ,
104104 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
105105 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
106106 }
@@ -139,7 +139,7 @@ func TestValidate_PeerNotRecognized_FirstApplicationReturnedError(t *testing.T)
139139 applications : []Application {
140140 application1 ,
141141 application2 },
142- allowList : EmptyAllowList ,
142+ allowList : EmptyAllowList () ,
143143 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
144144 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
145145 }
@@ -164,7 +164,7 @@ func TestValidate_PeerRecognized_Cached(t *testing.T) {
164164
165165 policy := & anyApplicationPolicy {
166166 applications : []Application {application },
167- allowList : EmptyAllowList ,
167+ allowList : EmptyAllowList () ,
168168 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
169169 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
170170 }
@@ -203,7 +203,7 @@ func TestValidate_PeerNotRecognized_CacheEmptied(t *testing.T) {
203203
204204 policy := & anyApplicationPolicy {
205205 applications : []Application {application },
206- allowList : EmptyAllowList ,
206+ allowList : EmptyAllowList () ,
207207 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
208208 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
209209 }
@@ -238,7 +238,7 @@ func TestValidate_PeerNotRecognized_Cached(t *testing.T) {
238238 application := newMockApplication ()
239239 policy := & anyApplicationPolicy {
240240 applications : []Application {application },
241- allowList : EmptyAllowList ,
241+ allowList : EmptyAllowList () ,
242242 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
243243 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
244244 }
@@ -273,7 +273,7 @@ func TestValidate_PeerRecognized_CacheEmptied(t *testing.T) {
273273
274274 policy := & anyApplicationPolicy {
275275 applications : []Application {application },
276- allowList : EmptyAllowList ,
276+ allowList : EmptyAllowList () ,
277277 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
278278 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
279279 }
@@ -338,11 +338,11 @@ func TestValidate_EmptyAllowList_RecognizedPeerAccepted(t *testing.T) {
338338 err : nil ,
339339 })
340340
341- // With EmptyAllowList, a recognized peer must pass validation through
341+ // With EmptyAllowList() , a recognized peer must pass validation through
342342 // the IsRecognized path, not through an AllowList bypass.
343343 policy := & anyApplicationPolicy {
344344 applications : []Application {application },
345- allowList : EmptyAllowList ,
345+ allowList : EmptyAllowList () ,
346346 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
347347 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
348348 }
@@ -361,11 +361,11 @@ func TestValidate_EmptyAllowList_UnrecognizedPeerRejected(t *testing.T) {
361361 t .Fatal (err )
362362 }
363363
364- // With EmptyAllowList, a peer not recognized by any application must
364+ // With EmptyAllowList() , a peer not recognized by any application must
365365 // be rejected. No AllowList bypass is available.
366366 policy := & anyApplicationPolicy {
367367 applications : []Application {newMockApplication ()},
368- allowList : EmptyAllowList ,
368+ allowList : EmptyAllowList () ,
369369 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
370370 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
371371 }
@@ -388,7 +388,7 @@ func TestValidate_EmptyAllowList_PreviouslyAllowlistedPeerMustPassIsRecognized(t
388388 // The peer is not recognized by the application and must be rejected.
389389 policy := & anyApplicationPolicy {
390390 applications : []Application {newMockApplication ()},
391- allowList : EmptyAllowList ,
391+ allowList : EmptyAllowList () ,
392392 positiveResultCache : cache .NewTimeCache (cachingPeriod ),
393393 negativeResultCache : cache .NewTimeCache (cachingPeriod ),
394394 }
0 commit comments