Skip to content

Commit 8a4ea58

Browse files
committed
fix(tests): fix 2 test failures on preview branch
- create.test.ts: add --framework flag to dry-run test so it routes to the agent path where --dry-run is supported (harness path is now the default and does not support --dry-run) - pre-deploy-identity.test.ts: add createControlClient to the aws/index.js mock now that pre-deploy-identity imports it
1 parent 3fd6668 commit 8a4ea58

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/cli/commands/create/__tests__/create.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,18 @@ describe('create command', () => {
265265
const projectName = `DryProj${Date.now().toString().slice(-6)}`;
266266
const agentName = `DryAgent${Date.now().toString().slice(-6)}`;
267267
const result = await runCLI(
268-
['create', '--project-name', projectName, '--name', agentName, '--defaults', '--dry-run', '--json'],
268+
[
269+
'create',
270+
'--project-name',
271+
projectName,
272+
'--name',
273+
agentName,
274+
'--defaults',
275+
'--framework',
276+
'Strands',
277+
'--dry-run',
278+
'--json',
279+
],
269280
testDir
270281
);
271282

src/cli/operations/deploy/__tests__/pre-deploy-identity.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ vi.mock('../../../../lib/index.js', () => ({
7878

7979
vi.mock('../../../aws/index.js', () => ({
8080
getCredentialProvider: mockGetCredentialProvider,
81+
createControlClient: vi.fn(() => ({ send: mockControlSend })),
8182
}));
8283

8384
vi.mock('../../../errors.js', () => ({

0 commit comments

Comments
 (0)