fix(housekeeping): harden system workflow boundaries
This commit is contained in:
1 parent
3788ecd9f1
commit
c325c53774
18 files changed
+809
-79
No files matched your search
@@ -155,3 +155,52 @@ describe.each(pageCases)(
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it.each([
|
||||
[
|
||||
"access",
|
||||
(result: HousekeepingResult<unknown>) =>
|
||||
renderToStaticMarkup(<SystemAccessPage result={result as never} />),
|
||||
{
|
||||
kind: "permissions",
|
||||
ranks: [],
|
||||
acl: { roles: 0, permissions: 0 },
|
||||
partialDependencies: ["acl"],
|
||||
},
|
||||
],
|
||||
[
|
||||
"configuration",
|
||||
(result: HousekeepingResult<unknown>) =>
|
||||
renderToStaticMarkup(
|
||||
<SystemConfigurationPage result={result as never} />,
|
||||
),
|
||||
{
|
||||
kind: "emulator",
|
||||
settings: [],
|
||||
texts: [],
|
||||
textsTotal: 0,
|
||||
partialDependencies: ["emulator-texts"],
|
||||
},
|
||||
],
|
||||
[
|
||||
"observability",
|
||||
(result: HousekeepingResult<unknown>) =>
|
||||
renderToStaticMarkup(
|
||||
<SystemObservabilityPage result={result as never} />,
|
||||
),
|
||||
{
|
||||
kind: "devops",
|
||||
health: null,
|
||||
errors: [],
|
||||
partialDependencies: ["health"],
|
||||
},
|
||||
],
|
||||
] as const)(
|
||||
"renders %s as partial when a dependency failed and surviving data is empty",
|
||||
(_name, render, data) => {
|
||||
const html = render(ok(data, correlationId));
|
||||
|
||||
expect(html).toContain('data-housekeeping-state="partial"');
|
||||
expect(html).not.toContain('data-housekeeping-state="empty"');
|
||||
},
|
||||
);
|
||||
Reference in new issue
Block a user