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

#173: Reaper reuse #176

Merged
merged 2 commits into from
Apr 14, 2020
Merged

#173: Reaper reuse #176

merged 2 commits into from
Apr 14, 2020

Conversation

ikolomiyets
Copy link
Contributor

Reusing existing reaper for subsequent container/network create calls. This ensures that any networks, created as part of the test case will be removed.
Fixes #173

… calls. This ensures that any networks, created as part of the test case will be removed.
@gianarb gianarb self-requested a review April 6, 2020 07:39
@gianarb gianarb added the feature New functionality or new behaviors on the existing one label Apr 6, 2020
@gianarb
Copy link
Member

gianarb commented Apr 6, 2020

Thank you for that! I Will have look very soon!

…lly it also was that unlike container, network was not removed explicitly.

I've rectified this in the latest commit by modifying the way network is created and removed.
@ikolomiyets
Copy link
Contributor Author

The issue was more complex apparently.
I've changed the func (n *DockerNetwork) Remove(ctx context.Context) function, so it explicitly calls Docker API to remove network.
I've also added the generic method to create network similarly to the way Container is being created.

@gianarb gianarb merged commit a18968f into testcontainers:master Apr 14, 2020
@gianarb
Copy link
Member

gianarb commented Apr 14, 2020

Great work! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network is not being removed by reaper
2 participants