mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-31 05:19:09 +08:00
test(k8s): gate e2e on ENABLE_K8S_E2E to avoid network-dependent failures in CI
This commit is contained in:
@@ -21,7 +21,9 @@ describe('Cloud Runner Kubernetes', () => {
|
||||
setups();
|
||||
|
||||
if (CloudRunnerOptions.cloudRunnerDebug) {
|
||||
it('Run one build it using K8s without error', async () => {
|
||||
const enableK8sE2E = process.env.ENABLE_K8S_E2E === 'true';
|
||||
|
||||
const testBody = async () => {
|
||||
if (CloudRunnerOptions.providerStrategy !== `k8s`) {
|
||||
return;
|
||||
}
|
||||
@@ -52,6 +54,14 @@ describe('Cloud Runner Kubernetes', () => {
|
||||
expect(results).not.toContain(cachePushFail);
|
||||
|
||||
CloudRunnerLogger.log(`run 1 succeeded`);
|
||||
}, 1_000_000_000);
|
||||
};
|
||||
|
||||
if (enableK8sE2E) {
|
||||
it('Run one build it using K8s without error', testBody, 1_000_000_000);
|
||||
} else {
|
||||
it.skip('Run one build it using K8s without error - disabled (no outbound network)', () => {
|
||||
CloudRunnerLogger.log('Skipping K8s e2e (ENABLE_K8S_E2E not true)');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user