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

fix: handle nil value in CleanupNetwork #2928

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

l0nax
Copy link
Contributor

@l0nax l0nax commented Dec 20, 2024

The godoc of CleanupNetwork states that a nil network will result in a no-op.

What does this PR do?

Fix ClenaupNetwork behavior to match with its godoc.

Why is it important?

Function behaves differently than documented in godoc.

Related issues

Closes #2927

The godoc of `CleanupNetwork` states that a `nil` network will result in
a no-op.
@l0nax l0nax requested a review from a team as a code owner December 20, 2024 12:39
Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 1f88e44
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/6765658108063c00089cc687
😎 Deploy Preview https://deploy-preview-2928--testcontainers-go.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

@stevenh stevenh 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 PR good catch

@l0nax l0nax changed the title fix: Handle nil value in CleanupNetwork fix: handle nil value in CleanupNetwork Dec 20, 2024
@mdelapenya mdelapenya self-assigned this Dec 20, 2024
@mdelapenya mdelapenya added the bug An issue with the library label Dec 20, 2024
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdelapenya mdelapenya merged commit 4f67ae0 into testcontainers:main Dec 20, 2024
124 of 125 checks passed
@l0nax l0nax deleted the check-nil-network-in-cleanup branch December 20, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Crash in CleanupNetwork with nil value
3 participants