diff options
Diffstat (limited to 'test/integration/oidc.go')
| -rw-r--r-- | test/integration/oidc.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/integration/oidc.go b/test/integration/oidc.go index 9fa465e..3a061fb 100644 --- a/test/integration/oidc.go +++ b/test/integration/oidc.go @@ -1,6 +1,7 @@ package test import ( + "net" "net/http" "testing" @@ -9,7 +10,7 @@ import ( ) func NewOIDCTestServer(t *testing.T) *mockoidc.MockOIDC { - srv, err := mockoidc.Run() + srv, err := mockoidc.NewServer(nil) require.NoError(t, err) srv.AddMiddleware(func(next http.Handler) http.Handler { @@ -19,5 +20,8 @@ func NewOIDCTestServer(t *testing.T) *mockoidc.MockOIDC { }) }) + ln, err := net.Listen("tcp", "0.0.0.0:0") + require.NoError(t, err) + require.NoError(t, srv.Start(ln, nil)) return srv } |
