Skip to content

Comments

refactor: testimages and tests to use builder API#804

Merged
DDtKey merged 9 commits intotestcontainers:mainfrom
mbodmer:feat/refactor-testimages
Jul 22, 2025
Merged

refactor: testimages and tests to use builder API#804
DDtKey merged 9 commits intotestcontainers:mainfrom
mbodmer:feat/refactor-testimages

Conversation

@mbodmer
Copy link
Contributor

@mbodmer mbodmer commented Jul 2, 2025

This PR is based on feat/build-image from PR: #801

@netlify
Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit 30fb285
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-rust/deploys/687fec9be6931a0008c923f9
😎 Deploy Preview https://deploy-preview-804--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 project configuration.

@mbodmer mbodmer changed the title feat: refactor testimages and tests to use builder API refactor: testimages and tests to use builder API Jul 2, 2025
@mbodmer mbodmer marked this pull request as ready for review July 3, 2025 08:32
@DDtKey
Copy link
Contributor

DDtKey commented Jul 3, 2025

We can make a chain of PRs, this can point to branch of #801. So it will show clear diff

@mbodmer
Copy link
Contributor Author

mbodmer commented Jul 3, 2025

We can make a chain of PRs, this can point to branch of #801. So it will show clear diff

how would i do that? Merge this PR into mbodmer:/feat/build-image from #801 ? This is not possible, as i cannot choose this branch as the target branch of the PR.

@DDtKey
Copy link
Contributor

DDtKey commented Jul 3, 2025

Right, that's your fork's branch
Never mind, it will be clearer once we merge builder

@mbodmer
Copy link
Contributor Author

mbodmer commented Jul 8, 2025

Could you please start the build again? Thanks

@mbodmer
Copy link
Contributor Author

mbodmer commented Jul 17, 2025

rebased to the current state of #801

@mbodmer mbodmer force-pushed the feat/refactor-testimages branch from 7c1df2e to a6e8e01 Compare July 18, 2025 12:48
@mbodmer
Copy link
Contributor Author

mbodmer commented Jul 18, 2025

Again, rebased to the current state of #801

@mervyn-mccreight
Copy link
Contributor

@mbodmer the builder api pr has been merged, let's tackle this one next :)

mbodmer and others added 8 commits July 19, 2025 10:18
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
Signed-off-by: mbodmer <marc.bodmer@email.ch>
@mbodmer mbodmer force-pushed the feat/refactor-testimages branch from 42e8468 to 210dd56 Compare July 19, 2025 08:49
@mbodmer
Copy link
Contributor Author

mbodmer commented Jul 19, 2025

A good feature for future improvement would be having an ignore list or better recognize .dockerignore/.containerignore files, when adding a directory to the build context.

…ner.rs unittests

Signed-off-by: mbodmer <marc.bodmer@email.ch>
@DDtKey DDtKey enabled auto-merge (squash) July 22, 2025 20:24
@DDtKey DDtKey merged commit 7c49d8c into testcontainers:main Jul 22, 2025
18 checks passed
@github-actions github-actions bot mentioned this pull request Jul 27, 2025
mervyn-mccreight pushed a commit that referenced this pull request Jul 27, 2025
## 🤖 New release

* `testcontainers`: 0.24.0 -> 0.25.0 (⚠ API breaking changes)

### ⚠ `testcontainers` breaking changes

```text
--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_variant_added.ron

Failed in:
  variant ClientError:BuildImage in /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/client.rs:71
  variant ClientError:BuildImage in /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/client.rs:71
  variant LogSource:BothStd in /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/logs.rs:32

--- failure trait_method_added: pub trait method added ---

Description:
A non-sealed public trait added a new method without a default implementation, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/trait_method_added.ron

Failed in:
  trait method testcontainers::core::ImageExt::with_ready_conditions in file /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:184
  trait method testcontainers::core::ImageExt::with_health_check in file /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:206
  trait method testcontainers::ImageExt::with_ready_conditions in file /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:184
  trait method testcontainers::ImageExt::with_health_check in file /tmp/.tmp8ymZuo/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:206
```

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.25.0] - 2025-07-27

### Details
#### Bug Fixes
- Make tls features optional
([#806](#806))
- Add `Send` trait to `stderr` & `stdout` of `ExecResult`
([#809](#809))
- Added new parse rule for correctly parsing ports without protocol
specifier
([#812](#812))

#### Features
- Allow ready conditions customization via ImageExt
([#794](#794))
- Allow to wait for log line on either stdout or stderr
([#795](#795))
- Add `Container*::exit_code`
([#791](#791))
- Add `Container*::is_running`
([#790](#790))
- Add custom health check support for containers
([#816](#816))
- Introduce container builder api
([#801](#801))

#### Miscellaneous Tasks
- [❗] Update bollard to 1.19.1
([#817](#817))

#### Refactor
- Testimages and tests to use builder API
([#804](#804))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants