✅ back: diagnostics e2e adding aggregate failure result (#762)
This commit is contained in:
@@ -2,6 +2,7 @@ import "reflect-metadata";
|
||||
import { afterAll, beforeEach, describe, expect, it, jest } from "@jest/globals";
|
||||
import { init, TestPlatform } from "../setup";
|
||||
import { getConfig as getDiagnosticsConfig } from "../../../src/core/platform/framework/api/diagnostics";
|
||||
import { e2eTestOverride as processDiagnosticProviderE2EOverride } from "../../../src/core/platform/services/diagnostics/providers/process";
|
||||
|
||||
describe("The diagnostics infrastucture", () => {
|
||||
let platform: TestPlatform;
|
||||
@@ -48,4 +49,15 @@ describe("The diagnostics infrastucture", () => {
|
||||
expect(result.statusCode).toBe(200);
|
||||
expect(result.json().ok).toBe(true);
|
||||
});
|
||||
|
||||
it("should aggregate failure", async () => {
|
||||
try {
|
||||
processDiagnosticProviderE2EOverride.forceFail = true;
|
||||
const result = await getDiagnosticTags("ready", diagnosticConfig.probeSecret!);
|
||||
expect(result.statusCode).toBe(503);
|
||||
expect(result.json().ok).toBe(false);
|
||||
} finally {
|
||||
processDiagnosticProviderE2EOverride.forceFail = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user