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: Add pausing and unpausing container #1315

Merged
merged 7 commits into from
Jan 8, 2025

Conversation

stefannikolei
Copy link
Contributor

What does this PR do?

Added Methods to Pause and Unpause an container

Why is it important?

Wanted to change some tests in CoreWCF to Testcontainers. Pause and Unpause is used there. Tho I need those methods to continue the implementation

Copy link

netlify bot commented Dec 14, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 0d9c943
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/677e6920a3d1e700082205e2
😎 Deploy Preview https://deploy-preview-1315--testcontainers-dotnet.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.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Before I review it, could you please add a test? I'm not sure how we can properly test it, but maybe it's enough to run a simple alpine container, pause it, and check its state?

@stefannikolei
Copy link
Contributor Author

Thanks for the PR. Before I review it, could you please add a test? I'm not sure how we can properly test it, but maybe it's enough to run a simple alpine container, pause it, and check its state?

Yeah, I was not sure either. Gonna look into a basic test. Where would you want me to put it? testContainers.Tests Unit/Containers/Unix

* fixed a bug in unpause. We now only unpause when the container is in State.Pause
@HofmeisterAn
Copy link
Collaborator

Thanks for the PR. Before I review it, could you please add a test? I'm not sure how we can properly test it, but maybe it's enough to run a simple alpine container, pause it, and check its state?

Yeah, I was not sure either. Gonna look into a basic test. Where would you want me to put it? testContainers.Tests Unit/Containers/Unix

Just put it into the Testcontainers.Platform.Linux.Tests test project, thanks.

@stefannikolei
Copy link
Contributor Author

Thanks for the PR. Before I review it, could you please add a test? I'm not sure how we can properly test it, but maybe it's enough to run a simple alpine container, pause it, and check its state?

Yeah, I was not sure either. Gonna look into a basic test. Where would you want me to put it? testContainers.Tests Unit/Containers/Unix

Just put it into the Testcontainers.Platform.Linux.Tests test project, thanks.

Done

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I made some minor changes (mostly related to the documentation). If you’re OK with the changes, we can go ahead and merge the PR. Thanks again.

src/Testcontainers/Containers/DockerContainer.cs Outdated Show resolved Hide resolved
@HofmeisterAn HofmeisterAn changed the title Add PauseAsync and UnpauseAsync feat: Add pausing and unpausing container Jan 8, 2025
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Jan 8, 2025
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks 👏

@HofmeisterAn HofmeisterAn merged commit 63422de into testcontainers:develop Jan 8, 2025
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants