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

docs: add examples of ImageExt usage and cover GenericImage #747

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

hovinen
Copy link
Contributor

@hovinen hovinen commented Oct 13, 2024

I struggled a bit when upgrading to testcontainers-rs 0.23, since the interfaces had changed somewhat since the last version I used. The documentation didn't explain exactly how to use the methods in ImageExt in conjunction with those of GenericImage.

This change adds a bit more content to the documentation:

  • A few more lines in the README file to exercise the configuration methods in ImageExt,
  • Some documentation for GenericImage showing how it is used along with ImageExt.

The latter in particular includes a doctest. If the API is changed in the future so that further changes are needed, the doctest will fail and can be updated accordingly. This will make it easier for downstream users to understand how to port their code.

Copy link

netlify bot commented Oct 13, 2024

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit f9b1f5e
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/670d638f3da35200089cc236
😎 Deploy Preview https://deploy-preview-747--testcontainers-rust.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.

I struggled a bit when upgrading to testcontainers-rs 0.23, since the
interfaces had changed somewhat since the last version I used. The
documentation didn't explain exactly how to use the methods in `ImageExt`
in conjunction with those of `GenericImage`.

This change adds a bit more content to the documentation:

* A few more lines in the README file to exercise the configuration
  methods in `ImageExt`,
* Some documentation for `GenericImage` showing how it is used along with
  `ImageExt`.

The latter in particular includes a doctest. If the API is changed in the
future so that further changes are needed, the doctest will fail and can
be updated accordingly. This will make it easier for downstream users to
understand how to port their code.
@DDtKey
Copy link
Collaborator

DDtKey commented Oct 15, 2024

Thank you for the contribution! 🙏

We actually had a migration guide as part of 0.18, there were big changes: https://github.com/testcontainers/testcontainers-rs/releases/tag/0.18.0

But that's definitely not obvious place when we have several versions ahead.
Perhaps it makes sense to add a reference in readme, or preferably move it to our docs website

@DDtKey DDtKey changed the title Add some more documentation and a doctest on image creation docs: add examples of ImageExt usage and cover GenericImage Oct 15, 2024
@hovinen
Copy link
Contributor Author

hovinen commented Oct 15, 2024

Thanks for the quick approval!

It seems that the PR can't be merged yet due to some flakiness in the tests. I also don't see a way to retry the affected actions. Could you re-trigger them? Thank you.

@DDtKey DDtKey merged commit a440dc4 into testcontainers:main Oct 20, 2024
12 checks passed
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