summaryrefslogtreecommitdiff
path: root/test/integration/oidc.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-05-12 17:56:08 -0600
committermo khan <mo@mokhan.ca>2025-05-12 17:56:08 -0600
commit5c73fb9fe353123e490cbaada12582ab9ce5423d (patch)
tree16d14d2a7fef45ff16eb71a673f1fa0dec823de2 /test/integration/oidc.go
parentef2537d90e61227adbaa913e67b3d9bde70425ab (diff)
test: replace localhost with testcontainers internal hostname
Diffstat (limited to 'test/integration/oidc.go')
-rw-r--r--test/integration/oidc.go6
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
}