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

Add more content on how to use Exec function #1970

Merged
merged 3 commits into from Dec 15, 2023

Conversation

danvergara
Copy link
Contributor

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.

@danvergara danvergara requested a review from a team as a code owner December 4, 2023 18:19
Copy link

netlify bot commented Dec 4, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 236b6f8
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/657a9c4c1bd09f000857700f
😎 Deploy Preview https://deploy-preview-1970--testcontainers-go.netlify.app/features/override_container_command
📱 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.

@danvergara danvergara changed the title docs(features): add more content on exec function Add more content on how to use Exec function Dec 4, 2023

You can execute a command inside a running container, similar to a `docker exec` call:

```go
Copy link
Collaborator

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:

  1. in the markdown:
<!--codeinclude-->
[Tab text](../path/to/file.extension) inside_block:name_of_the_block
<!--/codeinclude-->
  1. 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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @danvergara, much appreciated! 🙏

Copy link
Collaborator

@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 @danvergara for taking the time for submitting this PR. Docs are really important for the onboarding on the project.

@mdelapenya mdelapenya self-assigned this Dec 15, 2023
@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Dec 15, 2023
@mdelapenya mdelapenya merged commit 9c97abf into testcontainers:main Dec 15, 2023
116 checks passed
@danvergara danvergara deleted the add-exec-doc branch December 15, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs, docs, docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants