From ceaeeb1dd12dfa5065965c201edab200d5283b9a Mon Sep 17 00:00:00 2001 From: joerger Date: Mon, 28 Oct 2024 12:50:58 -0700 Subject: [PATCH] Fix test. --- lib/client/sso/ceremony_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/client/sso/ceremony_test.go b/lib/client/sso/ceremony_test.go index 82969672eab21..c86c2f63cb598 100644 --- a/lib/client/sso/ceremony_test.go +++ b/lib/client/sso/ceremony_test.go @@ -81,7 +81,7 @@ func TestCLICeremony(t *testing.T) { // Read the clickable url from stderr and navigate to it // using a simplified regexp for http://127.0.0.1:/ - const clickableURLPattern = `^http://127.0.0.1:\d+/[0-9A-Fa-f-]+$` + const clickableURLPattern = `http://127.0.0.1:\d+/[0-9A-Fa-f-]+` clickableURL := regexp.MustCompile(clickableURLPattern).FindString(stderr.String()) resp, err := http.Get(clickableURL) require.NoError(t, err) @@ -132,7 +132,6 @@ func TestCLICeremony_MFA(t *testing.T) { t.Cleanup(mockIdPServer.Close) ceremony := sso.NewCLIMFACeremony(rd) - defer rd.Close() // Modify handle redirect to also browse to the clickable URL printed to stderr. baseHandleRedirect := ceremony.HandleRedirect