feat(wait): for file#2731
feat(wait): for file#2731mdelapenya merged 3 commits intotestcontainers:mainfrom stevenh:feat/wait-file
Conversation
Add the ability to wait for a file and optionally its contents. This leverages generated mocks using mockery and testify/mock to make testing easier.
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
This can be used to fix the circular dependency between the wait and ready conditions in elasticsearch as flagged on #272 as a missing test by turning the ready condition into a wait for the file exists condition. |
Add output of the docker config if we hit rate limiting to aid in debugging why this is happening on github actions. Don't use logger as that's no-op when verbose is not in effect.
mdelapenya
left a comment
There was a problem hiding this comment.
@stevenh this LGTM, thanks! I added a commit listing the new wait strategy in the different pages. PTAL at bb47f68 to verify my changes.
Also, here they are the rendered URL for the changes:
- Introduction: https://deploy-preview-2731--testcontainers-go.netlify.app/features/wait/introduction/
- The main menu already contains the new entry for the file strategy.
|
One additional (non-blocking) thing regarding this: can you share your own need for adding this wait strategy? I'm interested in learning more about how it's used in the wild |
Thanks for the info, appreciated. Is there any way we could catch this in CI? |
Yep, there's already requirement for it in this PR |
Not at the moment, and I think it would need the creation of custom automation for the validation, so not easy nor straight forward (I'm not aware of a tool that allows to detect this kind of things, but wishing it existed) |
* main: feat(wait): for file (#2731) feat(compose): select services via profiles (#2758) chore(deps): bump mkdocs-markdownextradata-plugin from 0.2.5 to 0.2.6 (#2761) fix: update template too (#2763) chore(deps): bump actions/checkout from 4.1.1 to 4.1.7 (#2762) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.4 to 6.2.2 (#2760) fix: check if the discovered docker socket responds (#2741) Upgrade milvus-io/milvus-sdk-go to avoid checksum mismatch. (#2753) Fix trailing slash on Image Prefix (#2747) chore: use new testcontainers/ryuk:0.9.0 image (#2750) chore(deps): bump minimal Go version from 1.21 to 1.22 (#2743)
* main: docs: refine heading badges in README (testcontainers#2770) feat(wait): for file (testcontainers#2731) feat(compose): select services via profiles (testcontainers#2758) chore(deps): bump mkdocs-markdownextradata-plugin from 0.2.5 to 0.2.6 (testcontainers#2761) fix: update template too (testcontainers#2763) chore(deps): bump actions/checkout from 4.1.1 to 4.1.7 (testcontainers#2762) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.4 to 6.2.2 (testcontainers#2760) fix: check if the discovered docker socket responds (testcontainers#2741) Upgrade milvus-io/milvus-sdk-go to avoid checksum mismatch. (testcontainers#2753) Fix trailing slash on Image Prefix (testcontainers#2747) chore: use new testcontainers/ryuk:0.9.0 image (testcontainers#2750)
* main: ci: add generate for mocks (testcontainers#2774) fix: docker config error handling when config file does not exist (testcontainers#2772) docs: refine heading badges in README (testcontainers#2770) feat(wait): for file (testcontainers#2731) feat(compose): select services via profiles (testcontainers#2758) chore(deps): bump mkdocs-markdownextradata-plugin from 0.2.5 to 0.2.6 (testcontainers#2761) fix: update template too (testcontainers#2763) chore(deps): bump actions/checkout from 4.1.1 to 4.1.7 (testcontainers#2762) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.4 to 6.2.2 (testcontainers#2760) fix: check if the discovered docker socket responds (testcontainers#2741) Upgrade milvus-io/milvus-sdk-go to avoid checksum mismatch. (testcontainers#2753) Fix trailing slash on Image Prefix (testcontainers#2747) chore: use new testcontainers/ryuk:0.9.0 image (testcontainers#2750)
* main: (29 commits) fix: template for code generation (#2800) fix: update module path (#2797) fix: container logging deadlocks (#2791) chore: use a much smaller image for testing (#2795) fix: parallel containers clean race (#2790) fix(registry): wait for (#2793) fix: container timeout test (#2792) docs: document redpanda options (#2789) feat: support databend module (#2779) chore: golangci-lint 1.61.0 (#2787) fix(mssql): bump Docker image version (#2786) fix: handle 127 error code for podman compatibility (#2778) fix: do not override ImageBuildOptions.Labels when building from a Dockerfile (#2775) feat(mongodb): Wait for mongodb module with a replicaset to finish (#2777) fix(postgres): Apply default snapshot name if no name specified (#2783) fix: resource clean up for tests and examples (#2738) ci: add generate for mocks (#2774) fix: docker config error handling when config file does not exist (#2772) docs: refine heading badges in README (#2770) feat(wait): for file (#2731) ...
Add the ability to wait for a file and optionally its contents.
This leverages generated mocks using mockery and testify/mock to make testing easier.