Skip to content

Commit 321177c

Browse files
authored
fix(e2e): use --runtime flag instead of non-existent --agent in byo-custom-jwt tests (#795)
PR #749 introduced MCP bearer-token E2E tests that pass --agent to the invoke command, but the CLI defines --runtime for selecting a specific runtime. This caused the "MCP agent: rejects SigV4 invocation" test to fail on main with "error: unknown option '--agent'". The other new tests passed by accident because their assertions checked for the absence of an auth error, and a CLI parsing error also doesn't match that pattern.
1 parent 767fd4c commit 321177c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

e2e-tests/byo-custom-jwt.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ describe.sequential('e2e: BYO agent with CUSTOM_JWT auth', () => {
288288

289289
// Invoke with bearer token — should NOT get auth mismatch
290290
const result = await runLocalCLI(
291-
['invoke', '--prompt', 'Say hello', '--agent', agentName, '--bearer-token', accessToken, '--json'],
291+
['invoke', '--prompt', 'Say hello', '--runtime', agentName, '--bearer-token', accessToken, '--json'],
292292
projectPath
293293
);
294294

@@ -304,7 +304,7 @@ describe.sequential('e2e: BYO agent with CUSTOM_JWT auth', () => {
304304
async () => {
305305
expect(projectPath, 'Project should have been deployed').toBeTruthy();
306306

307-
const result = await runLocalCLI(['invoke', '--agent', mcpAgentName, 'list-tools', '--json'], projectPath);
307+
const result = await runLocalCLI(['invoke', '--runtime', mcpAgentName, 'list-tools', '--json'], projectPath);
308308

309309
const output = stripAnsi(result.stdout + result.stderr);
310310
expect(output).toMatch(/[Aa]uthoriz(ation|er).*mismatch|different.*authorization/i);
@@ -320,7 +320,7 @@ describe.sequential('e2e: BYO agent with CUSTOM_JWT auth', () => {
320320
const accessToken = await fetchCognitoAccessToken();
321321

322322
const result = await runLocalCLI(
323-
['invoke', '--agent', mcpAgentName, 'list-tools', '--bearer-token', accessToken, '--json'],
323+
['invoke', '--runtime', mcpAgentName, 'list-tools', '--bearer-token', accessToken, '--json'],
324324
projectPath
325325
);
326326

@@ -340,7 +340,7 @@ describe.sequential('e2e: BYO agent with CUSTOM_JWT auth', () => {
340340
const result = await runLocalCLI(
341341
[
342342
'invoke',
343-
'--agent',
343+
'--runtime',
344344
mcpAgentName,
345345
'call-tool',
346346
'--tool',

0 commit comments

Comments
 (0)