Skip to content

Use real LocalStack resources in status command integration test#143

Merged
carole-lavillonniere merged 1 commit intomainfrom
status-cmd-test
Mar 19, 2026
Merged

Use real LocalStack resources in status command integration test#143
carole-lavillonniere merged 1 commit intomainfrom
status-cmd-test

Conversation

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator

Motivation

TestStatusCommandShowsResourcesWhenRunning was testing resource display against a mock HTTP server, which meant it couldn't catch issues with how lstk status interprets actual LocalStack responses.

Changes

  • Start a real LocalStack instance instead of an alpine stub + mock HTTP server
  • Create an S3 bucket and SQS queue via AWS SDK v2, then verify both appear in lstk status output
  • Add AWS SDK v2 packages to the integration test module

@carole-lavillonniere carole-lavillonniere marked this pull request as ready for review March 19, 2026 13:39
Copy link
Copy Markdown
Contributor

@anisaoshafi anisaoshafi left a comment

Choose a reason for hiding this comment

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

Nice 👏🏼

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 47b0d95d-204f-4fd3-9f7f-470cda5590ea

📥 Commits

Reviewing files that changed from the base of the PR and between 2cad96e and bb6bb9c.

⛔ Files ignored due to path filters (1)
  • test/integration/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • test/integration/go.mod
  • test/integration/status_test.go

📝 Walkthrough

Walkthrough

This PR adds AWS SDK v2 dependencies to test/integration/go.mod and refactors TestStatusCommandShowsResourcesWhenRunning to create real S3 and SQS resources using AWS SDK clients instead of mocking HTTP responses, while introducing an auth token requirement and mock license server setup.

Changes

Cohort / File(s) Summary
Dependency Updates
test/integration/go.mod
Added direct dependencies for github.com/aws/aws-sdk-go-v2 and submodules (config, credentials, service/s3, service/sqs); migrated docker/go-connections from indirect to direct requirement; added corresponding transitive aws-sdk-go-v2 component modules.
Test Refactoring
test/integration/status_test.go
Replaced custom HTTP mock server with mock license server; added auth token requirement; introduced real AWS SDK v2 interactions to create S3 bucket and SQS queue; updated status assertions to validate new resources instead of mocked responses.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: replacing mock HTTP server testing with real LocalStack resources in the status command integration test.
Description check ✅ Passed The description is clearly related to the changeset, explaining the motivation for the changes and documenting what was modified.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch status-cmd-test
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@carole-lavillonniere carole-lavillonniere merged commit cd3ed4b into main Mar 19, 2026
8 checks passed
@carole-lavillonniere carole-lavillonniere deleted the status-cmd-test branch March 19, 2026 15:18
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