summaryrefslogtreecommitdiff
path: root/test/integration/oidc.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/oidc.go')
-rw-r--r--test/integration/oidc.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/integration/oidc.go b/test/integration/oidc.go
deleted file mode 100644
index 35653ef..0000000
--- a/test/integration/oidc.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package test
-
-import (
- "net"
- "net/http"
- "testing"
-
- "github.com/oauth2-proxy/mockoidc"
- "github.com/stretchr/testify/require"
-)
-
-func NewOIDCTestServer(t *testing.T) *mockoidc.MockOIDC {
- srv, err := mockoidc.NewServer(nil)
- require.NoError(t, err)
-
- srv.AddMiddleware(func(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- t.Logf("%v %v %v\n", r.Method, r.URL.Path, r.URL.Query())
- next.ServeHTTP(w, r)
- })
- })
-
- ln, err := net.Listen("tcp4", "0.0.0.0:0")
- require.NoError(t, err)
- require.NoError(t, srv.Start(ln, nil))
- return srv
-}