-
-
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
Add more content on how to use Exec function #1970
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
73ce581
to
5b2be4f
Compare
5b2be4f
to
9f6b81f
Compare
|
||
You can execute a command inside a running container, similar to a `docker exec` call: | ||
|
||
```go |
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.
Instead of pasting here code snippets, we usually embed code blocks with the <!--codeinclude-->
block.
Please take a look at how it's implemented, as it's unfortunately not documented (yet).
It basically needs:
- in the markdown:
<!--codeinclude-->
[Tab text](../path/to/file.extension) inside_block:name_of_the_block
<!--/codeinclude-->
- in the file.extension
// name_of_the_block {
... code snippet to be rendered in the markdown
// }
I'm going to use this comment as seed for an issue to include that in our docs.
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.
Thanks @mdelapenya. That makes sense. The thing is that the examples included in this PR are made up, don't correspond with any test available. I've seen that the those codeinclude
chunks reference code in test suite. Want me to include the examples to the test suite? Or where should I put those examples?
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.
I'm gonna be proactive and I'll add that example to the test suite. I'll let you know when that's ready.
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.
Thanks @danvergara, much appreciated! 🙏
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.
LGTM! Thanks @danvergara for taking the time for submitting this PR. Docs are really important for the onboarding on the project.
What does this PR do?
I'm adding more content to command section on the documentation. I didn't know about the
Exec
method until I came across this issue. So, I thought it'd be nice to have this documented.Why is it important?
As I described above, that method is really useful when it comes to run tests on a CI environment and everybody should know about it.
Related issues
There's no issue, I just asked if this is important enough to take the time to push some changes to the docs.
Just run
mkdocs serve
as stated in the contributions guideline.