-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
bug: Add missing import to test templates #2828
Conversation
❌ Deploy Preview for testcontainers-go failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the lint will complain if we do not add these blank lines separating imports
Other than that, LGTM
Co-authored-by: Manuel de la Peña <social.mdelapenya@gmail.com>
Co-authored-by: Manuel de la Peña <social.mdelapenya@gmail.com>
@ballcoach12 just to verify this is working, can you paste the output of generating a random module from your workspace? 🙏 |
I'm getting an error back, but the generated code appears to be correct.
|
So it means there is something else in the formatting 🤔 Could you please take a deep look into the generated files and the templates ? |
So just debugging the
So maybe a relative path is incorrect? |
I think 69594b8 should be reverted, as it does not belong to this branch, shouldn't it? |
Yes. My mistake there. Would it be better to delete this PR while I track down and fix the error that is occurring on the module generation? It feels like this PR is drifting a little. |
Remove proprietary modules
@ballcoach12 thanks for this contribution, but I think #2831 resolved it in a cleaner manner. In any case, thanks for your time and dedication for improving testcontainers-go! 💪 |
No worries. Sorry I couldn't be of more help. |
@ballcoach12 there are and there will be more issues/bugs to work on, so I encourage you to help the community in making progress with your work. Just let us know if we can be of any help |
What does this PR do?
This PR adds a missing import for
"github.com/testcontainers/testcontainers-go"
to the examples_test.go.tmpl and module_test.go.tmpl files.Why is it important?
Without this import, generating a new module will return an error code because the required module is not imported in the test files.
Related issues
How to test this PR
Generate a new module according to the instructions listed here. Verify that the list of imports contains
"github.com/testcontainers/testcontainers-go"
in the example test file and module test file.