Skip to content

Conversation

manavgurnani21
Copy link
Contributor

@manavgurnani21 manavgurnani21 commented Aug 7, 2025

Problem

With the introduction of a new Geo vertical, this PR aims to test these new features by adding integration tests that ensure smooth deployment throughout the amplify backend pipeline. Although unit tests exist within the changed packages (backend-geo and client-config), end-to-end integration tests all the interfaces between the Geo unit tests by running the Amplify deployment process on the new vertical.

Issue number, if available:

Changes

🧪 New Integration Test: Geo API Key Support

This integration tests the following features:

  • Geo construct creation and resource provisioning
  • API Key generation for AWS-managed resources

This integration test is based off a test project with the following Geo configuration:

export const map = defineMap({
  name: 'integrationTestMap',
  access: (allow) => [allow.authenticated.to(['get'])],
});

export const place = definePlace({
  name: 'integrationTestPlaceIndex',
  access: (allow) => [
    allow.authenticated.to(['search']),
    allow.guest.to(['geocode']),
    allow.apiKey.to(['autocomplete']),
  ],
  apiKeyProps: {
    apiKeyName: 'integrationTestIndexKey',
  },
});

export const collection = defineCollection({
  name: 'integrationTestCollection',
  description:
    'This is a geofence collection setup for integration testing purposes.',
  access: (allow) => [
    allow.authenticated.to(['create', 'read', 'update', 'delete']),
    allow.guest.to(['read', 'list']),
  ],
});

This configuration tests the resource provisioning (through Geofence Collections) and API key generation (for Place Indices) through the synthesis and deployment process. This configuration is tested in both sandbox and deployment environments for local and branch development validation.

Corresponding docs PR, if applicable: aws-amplify/docs#8412

Validation

Integration tests internally contain validation of the following:

  • ✅ Successful backend configuration synthesis
  • ✅ Successful sandbox/branch deployment
  • ✅ Successful amplify client output file generation and validation

This integration test contains the following additional checks:

  • ✅ Successful provisioning of Geofence Collections (through the SDK Location Client)
  • ✅ Successful generation of API keys (through the SDK Location Client)

Additional Validation:

  • ✅ Successful ESLint verification
  • ✅ Successful API generation

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a change to the Project Architecture README, I have included that update in this PR.
  • If this PR requires a docs update, I have linked to that docs PR above.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

changeset-bot bot commented Aug 7, 2025

🦋 Changeset detected

Latest commit: 1b36c48

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@manavgurnani21 manavgurnani21 added the run-e2e Label that will include e2e tests in PR checks workflow label Aug 7, 2025
@manavgurnani21 manavgurnani21 changed the base branch from main to feature/geo-L3-construct August 14, 2025 20:57
@manavgurnani21 manavgurnani21 marked this pull request as ready for review August 14, 2025 22:59
@manavgurnani21 manavgurnani21 requested review from a team as code owners August 14, 2025 22:59
@manavgurnani21 manavgurnani21 changed the title [Geo] Construct: Phase 3 - Integration Testing feat(Geo) Construct: Phase 3 - Integration Testing Aug 15, 2025
Copy link
Contributor

@sobolk sobolk left a comment

Choose a reason for hiding this comment

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

Very nice.

Copy link
Contributor

@rtpascual rtpascual left a comment

Choose a reason for hiding this comment

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

Looks good! :shipit:

@manavgurnani21 manavgurnani21 merged commit 3d5b28b into feature/geo-L3-construct Aug 15, 2025
90 of 91 checks passed
@manavgurnani21 manavgurnani21 deleted the mgurnani/geo-L3-construct-integration-tests branch August 15, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-e2e Label that will include e2e tests in PR checks workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants