fix(auth): harden unified diagnostic execution
This commit is contained in:
@@ -159,3 +159,19 @@ test.each([
|
||||
|
||||
await expect(validateWorkspace(workspace)).rejects.toThrow("invalid authentication diagnostics");
|
||||
});
|
||||
|
||||
test("rejects a workspace claimed activatable when authentication is not ready", async () => {
|
||||
server.use(http.post("/api/workspaces/validate", () => HttpResponse.json({
|
||||
workspace,
|
||||
contract: {},
|
||||
activatable: true,
|
||||
diagnostics: [],
|
||||
authentication: {
|
||||
ready: false,
|
||||
mode: "oidc",
|
||||
checks: [{ level: "error", code: "oidc_secret_missing", message: "Authentication is unavailable." }],
|
||||
},
|
||||
})));
|
||||
|
||||
await expect(validateWorkspace(workspace)).rejects.toThrow("invalid diagnostic result");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user