test(disk-space): drop redundant clamp-echo test (covered by previous)
This commit is contained in:
@@ -234,21 +234,6 @@ describe('routes/disk-space POST /config (DC-059 threshold ordering)', () => {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('returned config reflects clamped + merged values, not raw request body', async () => {
|
|
||||||
// All three clamped to 99 — equal values are rejected by the strict
|
|
||||||
// monotonic invariant. To prove clamping, set values that clamp to a
|
|
||||||
// valid ordered triple.
|
|
||||||
const res = await fetch('POST', '/config', {
|
|
||||||
warningThresholdPct: 9999, // → clamped to 99
|
|
||||||
criticalThresholdPct: 9999, // would also clamp to 99 — test single-field instead
|
|
||||||
});
|
|
||||||
expect(res.status).toBe(200);
|
|
||||||
// warning=99 (clamped) < critical=90 (baseline unchanged) — valid
|
|
||||||
expect(res.body.config.warningThresholdPct).toBe(99);
|
|
||||||
expect(res.body.config.criticalThresholdPct).toBe(90);
|
|
||||||
expect(res.body.config.cleanupAggressivePct).toBe(95);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('non-numeric threshold values are silently dropped (legacy behaviour preserved)', async () => {
|
test('non-numeric threshold values are silently dropped (legacy behaviour preserved)', async () => {
|
||||||
// Strings are not numbers → unchanged from baseline. Confirms the
|
// Strings are not numbers → unchanged from baseline. Confirms the
|
||||||
// ordering check doesn\'t reject legitimate "I didn\'t change this" requests.
|
// ordering check doesn\'t reject legitimate "I didn\'t change this" requests.
|
||||||
|
|||||||
Reference in New Issue
Block a user