diff --git a/gateway/mw_basic_auth_test.go b/gateway/mw_basic_auth_test.go index f4de92785a8..48b311e461b 100644 --- a/gateway/mw_basic_auth_test.go +++ b/gateway/mw_basic_auth_test.go @@ -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()