diff --git a/pkg/internal/testing/controlplane/apiserver.go b/pkg/internal/testing/controlplane/apiserver.go index c9a1a232ea..0da0f22067 100644 --- a/pkg/internal/testing/controlplane/apiserver.go +++ b/pkg/internal/testing/controlplane/apiserver.go @@ -421,7 +421,10 @@ func (s *APIServer) Stop() error { return err } } - return s.Authn.Stop() + if s.Authn != nil { + return s.Authn.Stop() + } + return nil } // APIServerDefaultArgs exposes the default args for the APIServer so that you