Skip to content

feat(gen2-migration): add gen1 and gen2 test scripts for mood-board app#14729

Merged
iliapolo merged 1 commit intogen2-migrationfrom
sanjrkmr/mood-board-test-scripts
Mar 31, 2026
Merged

feat(gen2-migration): add gen1 and gen2 test scripts for mood-board app#14729
iliapolo merged 1 commit intogen2-migrationfrom
sanjrkmr/mood-board-test-scripts

Conversation

@sanjanaravikumar-az
Copy link
Copy Markdown
Contributor

Description of changes

Adds Gen1 and Gen2 e2e test scripts for the mood-board migration app, enabling automated validation during the full migration pipeline.

The test scripts cover:

  • Board and MoodItem CRUD (public/apiKey auth)
  • moodItemsByBoardID index query
  • getRandomEmoji Lambda resolver (userPool auth)
  • getKinesisEvents Lambda resolver (userPool auth)
  • S3 storage upload, signed URL, and delete

Also fixes two pre-existing bugs discovered during testing:

  • schema.graphql: moodboardKinesisreadermoodboardKinesisReader (case mismatch caused Lambda 404)
  • configure.sh: removed configure-schema.sh call that hardcoded the API directory as moodboard, which doesn't match the deployment-name-based directory. The category initializer already handles schema updates dynamically.

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

Add e2e test scripts for the mood-board migration app,
following the same pattern as the other test apps
(project-boards, discussions, etc.).

New files:
- test-utils.ts: shared test functions and orchestrator
  covering Board/MoodItem CRUD, moodItemsByBoardID index,
  getRandomEmoji and getKinesisEvents Lambda resolvers,
  and S3 storage operations.
- gen1-test-script.ts: validates Gen1 deployment
- gen2-test-script.ts: validates Gen2 deployment

Bug fixes found during testing:
- schema.graphql: fixed function name case mismatch
  (moodboardKinesisreader -> moodboardKinesisReader)
  that caused a Lambda 404 at runtime.
- configure.sh: removed configure-schema.sh call that
  hardcoded the API directory name as "moodboard", which
  doesn't match the deployment-name-based directory
  created by amplify add api. The category initializer
  already handles schema updates dynamically.

Validated by running the full migration CLI pipeline:
gen1 post-push, gen2 post-generate, and gen1 post-refactor
all passed with zero failures.
---
Prompt: create a gen1 test script and gen2 test script
for mood-board app
@sanjanaravikumar-az sanjanaravikumar-az requested a review from a team as a code owner March 31, 2026 20:20
@iliapolo iliapolo merged commit d519a25 into gen2-migration Mar 31, 2026
4 checks passed
@iliapolo iliapolo deleted the sanjrkmr/mood-board-test-scripts branch March 31, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants