Test OpsProof intended login redirect
Homelab Main / validate (push) Failing after 1m50s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details

This commit is contained in:
juvenal.diaz 2026-12-04 22:23:57 -06:00
parent 3bdb2ae6eb
commit eda4231e2d
2 changed files with 2 additions and 1 deletions

View File

@ -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)
}

View File

@ -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"