Skip to content

Commit

Permalink
Fix basic auth middleware test, allocate BaseMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric authored and titpetric committed Dec 29, 2023
1 parent 6575f69 commit 00bf426
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gateway/mw_basic_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ func TestBasicAuthHashKeyFunc(t *testing.T) {

ts.Gw.apisMu.Lock()
assert.Len(t, ts.Gw.apiSpecs, 1)
k := &BasicAuthKeyIsValid{}
k := &BasicAuthKeyIsValid{
BaseMiddleware: &BaseMiddleware{},
}
k.Spec = ts.Gw.apiSpecs[0]
ts.Gw.apisMu.Unlock()

Expand Down

0 comments on commit 00bf426

Please sign in to comment.