Test OpsProof intended login redirect
This commit is contained in:
parent
3bdb2ae6eb
commit
eda4231e2d
|
|
@ -25,7 +25,7 @@ func TestDexLoginRequiresAnAllowedVerifiedOperator(t *testing.T) {
|
|||
Email: "operator@example.test",
|
||||
EmailVerified: true,
|
||||
})
|
||||
allowed.WithoutRedirects().Get("/auth/dex/callback").AssertRedirect("/")
|
||||
allowed.WithoutRedirects().Get("/auth/dex/callback").AssertRedirect("http://example.com/incidents/cluster/n8n")
|
||||
allowed.Get("/").AssertOK().AssertInertia("Welcome").AssertProp("operator.authenticated", true)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ class OpsProofPipelineTests(unittest.TestCase):
|
|||
ROOT / "apps/opsproof/overlay/tests/feature/authentication_test.go"
|
||||
).read_text(encoding="utf-8")
|
||||
self.assertIn('t.Setenv("OPSPROOF_OPERATOR_EMAILS"', auth_test)
|
||||
self.assertIn('AssertRedirect("http://example.com/incidents/cluster/n8n")', auth_test)
|
||||
|
||||
routes = (ROOT / "apps/opsproof/overlay/routes/web.go").read_text(
|
||||
encoding="utf-8"
|
||||
|
|
|
|||
Loading…
Reference in New Issue