From 34f406679abd28e95fe0ea8bc948efc00b341167 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Mon, 29 Dec 2025 17:16:40 +0000 Subject: [PATCH] pr feedback - test should fail on evictions --- .../tests/e2e/cloud-runner-kubernetes.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/model/cloud-runner/tests/e2e/cloud-runner-kubernetes.test.ts b/src/model/cloud-runner/tests/e2e/cloud-runner-kubernetes.test.ts index 6915bda6..272ebb9c 100644 --- a/src/model/cloud-runner/tests/e2e/cloud-runner-kubernetes.test.ts +++ b/src/model/cloud-runner/tests/e2e/cloud-runner-kubernetes.test.ts @@ -53,6 +53,18 @@ describe('Cloud Runner Kubernetes', () => { const incompleteLogsMessage = 'Pod logs incomplete - "Collected Logs" marker not found. Pod may have been terminated before post-build completed.'; + // Check if pod was evicted due to resource constraints - this is a test infrastructure failure + // Evictions indicate the cluster doesn't have enough resources, which is a test environment issue + if (results.includes('The node was low on resource: ephemeral-storage') || + results.includes('TerminationByKubelet') || + results.includes('Evicted')) { + throw new Error( + `Test failed: Pod was evicted due to resource constraints (ephemeral-storage). ` + + `This indicates the test environment doesn't have enough disk space. ` + + `Results: ${results.substring(0, 500)}` + ); + } + // If we hit the aggressive fallback path and couldn't retrieve any logs from the pod, // don't assert on specific Unity log contents – just assert that we got the fallback message. // This makes the test resilient to cluster-level evictions / PreStop hook failures while still