From 67890146b6aa3781939927cb13fdcaa281260540 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Thu, 30 Jul 2026 19:49:53 +0200 Subject: [PATCH] Assert the login status after the SSO flow starts --- client/server/login_outcome_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/server/login_outcome_test.go b/client/server/login_outcome_test.go index 70ffbe08b..d3b1b7c52 100644 --- a/client/server/login_outcome_test.go +++ b/client/server/login_outcome_test.go @@ -64,6 +64,11 @@ func TestLogin_AuthRefusalStartsSSOFlow(t *testing.T) { require.Error(t, err) require.NotErrorIs(t, err, refused, "the refusal was handed back to the caller instead of starting the SSO flow") + + status, stateErr := internal.CtxGetState(s.rootCtx).Status() + require.NoError(t, stateErr) + require.Equal(t, internal.StatusLoginFailed, status, + "the SSO flow setup was never reached with the broken key") } // breakProfilePrivateKey replaces the profile's private key with an unparseable