Skip to content

chore: add e2e & integ tests for web-search#1604

Merged
nborges-aws merged 1 commit into
mainfrom
web-search-e2e-tests
Jun 23, 2026
Merged

chore: add e2e & integ tests for web-search#1604
nborges-aws merged 1 commit into
mainfrom
web-search-e2e-tests

Conversation

@nborges-aws

Copy link
Copy Markdown
Contributor

Description

Related Issue

Closes #

Documentation PR

Type of Change

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

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.

@nborges-aws nborges-aws requested a review from a team June 22, 2026 14:37
@github-actions github-actions Bot added the size/m PR size: M label Jun 22, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 22, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 22, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.20.2.tgz

How to install

gh release download pr-1604-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.20.2.tgz

@agentcore-cli-automation agentcore-cli-automation left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to merge.

The new tests follow the established patterns (matching add-remove-gateway.test.ts and the existing e2e lifecycle suites), use real temp-dir projects rather than fs mocks, exercise both happy-path and validation-error branches, and include telemetry assertions on the success paths for add.gateway-target, remove.gateway-target, add.web-search, and remove.web-search. The e2e suite correctly pins AWS_REGION=us-east-1 (web-search is only available there) and restores it in afterAll, and uses describe.sequential + a short-circuit step() so a failure in an earlier step doesn't waste time on later ones.

A couple of small things I noticed but don't think need to block the merge:

  • integ-tests/add-remove-web-search.test.ts shares one module-level createTelemetryHelper() across both top-level describe blocks (and both call telemetry.destroy() in their own afterAll). It happens to work because the helper's destroy is idempotent (rmSync with force: true) and the asserted command names don't overlap between the two blocks, but it'd be a touch more robust to give each describe its own helper — same as add-remove-gateway.test.ts would need to do if it grew a second block.
  • In e2e-tests/web-search-lifecycle.test.ts, if canRun is false the beforeAll early-returns without ever touching AWS_REGION, but the afterAll still runs if (originalRegion === undefined) delete process.env.AWS_REGION — which would clobber a real AWS_REGION set on the host. Since each test file runs in its own isolated vitest worker this has no practical effect, but it's slightly cleaner to guard the restore on canRun as well.

Neither of these warrant a change before merge.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 36.91% 13500 / 36571
🔵 Statements 36.19% 14354 / 39655
🔵 Functions 31.47% 2309 / 7336
🔵 Branches 30.66% 8915 / 29070
Generated in workflow #3739 for commit fe0069c by the Vitest Coverage Report Action

@nborges-aws nborges-aws merged commit 1339f4f into main Jun 23, 2026
34 checks passed
@nborges-aws nborges-aws deleted the web-search-e2e-tests branch June 23, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants