Skip to content

Commit 9808478

Browse files
committed
fix: skip harness integration and e2e tests in GA builds
Harness features are gated behind BUILD_PREVIEW=1 and eliminated from GA bundles. Integration and e2e tests that exercise harness commands must skip when running against the default (GA) build.
1 parent 5f909ee commit 9808478

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

e2e-tests/harness-e2e-helper.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import { join } from 'node:path';
1313
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
1414

1515
const hasAws = hasAwsCredentials();
16-
const baseCanRun = prereqs.npm && prereqs.git && hasAws;
16+
// Harness features are only available in preview builds (BUILD_PREVIEW=1).
17+
const isPreviewBuild = process.env.BUILD_PREVIEW === '1';
18+
const baseCanRun = prereqs.npm && prereqs.git && hasAws && isPreviewBuild;
1719

1820
interface HarnessE2EConfig {
1921
modelProvider: 'bedrock' | 'open_ai' | 'gemini';

integ-tests/add-remove-harness.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ import { readFile } from 'node:fs/promises';
44
import { join } from 'node:path';
55
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
66

7+
// Harness features are only available in preview builds (BUILD_PREVIEW=1).
8+
// The standard CI build is GA, so skip these tests unless the preview bundle is present.
9+
const isPreviewBuild = process.env.BUILD_PREVIEW === '1';
10+
711
async function readHarnessSpec(projectPath: string, harnessName: string) {
812
return JSON.parse(await readFile(join(projectPath, `app/${harnessName}/harness.json`), 'utf-8'));
913
}
1014

11-
describe('integration: harness add/remove lifecycle', () => {
15+
describe.skipIf(!isPreviewBuild)('integration: harness add/remove lifecycle', () => {
1216
let project: TestProject;
1317
const harnessName = 'TestHarness';
1418

@@ -69,7 +73,7 @@ describe('integration: harness add/remove lifecycle', () => {
6973
});
7074
});
7175

72-
describe('integration: harness configuration options', () => {
76+
describe.skipIf(!isPreviewBuild)('integration: harness configuration options', () => {
7377
let project: TestProject;
7478

7579
beforeAll(async () => {
@@ -149,7 +153,7 @@ describe('integration: harness configuration options', () => {
149153
});
150154
});
151155

152-
describe('integration: harness validation errors', () => {
156+
describe.skipIf(!isPreviewBuild)('integration: harness validation errors', () => {
153157
let project: TestProject;
154158

155159
beforeAll(async () => {
@@ -176,7 +180,7 @@ describe('integration: harness validation errors', () => {
176180
});
177181
});
178182

179-
describe('integration: create project with harness', () => {
183+
describe.skipIf(!isPreviewBuild)('integration: create project with harness', () => {
180184
let project: TestProject;
181185
const harnessName = 'CreateHarness';
182186

0 commit comments

Comments
 (0)