Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update module container struct name and missing imports #2831

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

henripqt
Copy link
Contributor

What does this PR do?

Fixes the following in modulegen :

  • The generated name of the struct for the module is now Container leading to more idiomatic go (e.g postgres.Container)
  • Missing imports in test generated files
  • Removed // run{{ $title }}Container { from the example test as we can use the name of the Example{{$entrypoint}} instead

Why is it important?

New generated modules will be more idiomatic and won't have to fix imports manually

Related issues

No related issue but a request was made in this PR #2825 (comment) to name the container struct as Container from now on in preparation of v1

How to test this PR

Generate a new module

@henripqt henripqt requested a review from a team as a code owner October 17, 2024 10:51
Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit f039bf3
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67110d9ec0aed800085e4d57
😎 Deploy Preview https://deploy-preview-2831--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdelapenya
Copy link
Member

Thanks for this! I'm going to add a few commits on top to avoid you suffer the burden of updating the modulegen tests 🙏

@mdelapenya mdelapenya self-assigned this Oct 18, 2024
@mdelapenya mdelapenya added the bug An issue with the library label Oct 18, 2024
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdelapenya mdelapenya merged commit 00e7002 into testcontainers:main Oct 18, 2024
118 checks passed
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Oct 18, 2024
* main:
  feat: add yugabytedb module (testcontainers#2825)
  fix: update module container struct name and missing imports (testcontainers#2831)
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Oct 18, 2024
* main:
  fix(reaper): refactor to allow retries and fix races (testcontainers#2728)
  chore: update ryuk to 0.10.2 (testcontainers#2833)
  feat: add yugabytedb module (testcontainers#2825)
  fix: update module container struct name and missing imports (testcontainers#2831)
  chore: replace 'assert' with 'require' (testcontainers#2827)
  chore: replace 'assert' with 'require' for critical checks (testcontainers#2824)
  chore: bump ryuk to latest release (testcontainers#2818)
  feat: add require for critical checks (testcontainers#2812)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants