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

feat: support copying directories to container #735

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

guenhter
Copy link
Contributor

Now not only files but also directories can be copied.

The only open thing here (marked with a TODO) is, if a windows container is used, that absolute paths are not supported (yet). For me personally this is at the moment ok because I don't use Windows containers and not even have a Windows machine to implement that. Maybe this can be done by someone (I guess it is just one line or so) when it is needed.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit 3c025cc
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-rust/deploys/66e9382b6aefc30008d386d2
😎 Deploy Preview https://deploy-preview-735--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.

@guenhter guenhter changed the title feat: Support copying directories to container feat: support copying directories to container Sep 17, 2024
@guenhter
Copy link
Contributor Author

I already changed the PR title. The CI should succeed now...

Copy link
Collaborator

@DDtKey DDtKey left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! 👍

I'll take a look soon, sorry for delay

Copy link
Collaborator

@DDtKey DDtKey left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!
Looks good to me, don't think windows containers should be a blocker, we can re-consider this on-demand

@DDtKey DDtKey merged commit ece5002 into testcontainers:main Sep 24, 2024
12 checks passed
@DDtKey DDtKey added this to the 0.23.0 milestone Sep 24, 2024
@guenhter
Copy link
Contributor Author

Thx. That sound very pragmatic to me.

@guenhter guenhter deleted the support-copy-dir branch September 24, 2024 04:39
@guenhter
Copy link
Contributor Author

@DDtKey are there plans to crate a new release so this feature can be used?

@DDtKey
Copy link
Collaborator

DDtKey commented Sep 24, 2024

Yes, we will release the new version this week. I only wanted to check if I have anything else to include

@github-actions github-actions bot mentioned this pull request Sep 25, 2024
@DDtKey
Copy link
Collaborator

DDtKey commented Sep 25, 2024

I'm preparing release, just pushed small fix - found a typo in error definition.
It wIll be available soon, thank you for all efforts! 🙏

@github-actions github-actions bot mentioned this pull request Sep 25, 2024
DDtKey pushed a commit that referenced this pull request Sep 25, 2024
## 🤖 New release
* `testcontainers`: 0.22.0 -> 0.23.0 (⚠️ API breaking changes)

### ⚠️ `testcontainers` breaking changes

```
--- 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.35.0/src/lints/enum_variant_added.ron

Failed in:
  variant ClientError:UploadToContainerError in /tmp/.tmpnaUdoG/testcontainers-rs/testcontainers/src/core/client.rs:92
  variant ClientError:CopyToContainerError in /tmp/.tmpnaUdoG/testcontainers-rs/testcontainers/src/core/client.rs:94

--- 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.35.0/src/lints/trait_method_added.ron

Failed in:
  trait method testcontainers::core::ImageExt::with_copy_to in file /tmp/.tmpnaUdoG/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:62
  trait method testcontainers::ImageExt::with_copy_to in file /tmp/.tmpnaUdoG/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:62
```

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

<blockquote>

## [0.23.0] - 2024-09-25

### Details
#### Bug Fixes
- Expose public `copy` types
([#734](#734))
- Typo in an error variant
([#738](#738))

#### Features
- Support copy files to container
([#730](#730))
- Support copying directories to container
([#735](#735))

#### Miscellaneous Tasks
- Copy-to-container interface improvements
([#732](#732))

#### Refactor
- Replace dirs crate with etcetera
([#736](#736))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/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.

2 participants