Skip to content

fix(e2e): use --runtime flag instead of --agent in byo-custom-jwt tests#795

Merged
aidandaly24 merged 1 commit intomainfrom
fix/e2e-use-runtime-flag
Apr 9, 2026
Merged

fix(e2e): use --runtime flag instead of --agent in byo-custom-jwt tests#795
aidandaly24 merged 1 commit intomainfrom
fix/e2e-use-runtime-flag

Conversation

@aidandaly24
Copy link
Copy Markdown
Contributor

Description

PR #749 introduced MCP bearer-token E2E tests in byo-custom-jwt.test.ts that pass --agent to the invoke command, but the CLI defines --runtime for selecting a specific runtime (see src/cli/commands/invoke/command.tsx). This causes the "MCP agent: rejects SigV4 invocation" test to fail on main with error: unknown option '--agent'.

The other three new tests passed by accident because their assertions check for the absence of an auth error pattern, and a CLI parsing error also doesn't match that pattern — so the bug was masked.

This PR replaces all four --agent occurrences with --runtime in the E2E test.

Related Issue

Follow-up fix for #749

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

…ustom-jwt tests

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.
@aidandaly24 aidandaly24 requested a review from a team April 8, 2026 21:50
@github-actions github-actions bot added the size/xs PR size: XS label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Package Tarball

aws-agentcore-0.7.1.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-795-tarball/aws-agentcore-0.7.1.tgz

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.35% 6987 / 15753
🔵 Statements 43.82% 7415 / 16919
🔵 Functions 41.82% 1251 / 2991
🔵 Branches 43.26% 4687 / 10832
Generated in workflow #1679 for commit 688765b by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

@Hweinstock Hweinstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@aidandaly24 aidandaly24 merged commit 321177c into main Apr 9, 2026
22 of 23 checks passed
@aidandaly24 aidandaly24 deleted the fix/e2e-use-runtime-flag branch April 9, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants