testcontainers / testcontainers-ruby

Testcontainers for Ruby
MIT License
120 stars 16 forks source link

Allow for optionally passing options to `#remove` #31

Closed HeyNonster closed 8 months ago

HeyNonster commented 9 months ago

The Docker::Container remove method in docker-api conditionally accepts a hash of options

Furthermore, removing a docker container, by default, will not remove the volumes unless you pass v: true as a parameter.

Without the ability to pass v: true we can end up with many dangling volumes that take up disk space.

This commit adds an optional hash argument to the DockerContainer #remove method, it defaults to an empty hash.

To assist with tests I've also added:

guilleiguaran commented 9 months ago

@HeyNonster hi! can you run rake standard:fix locally so the code style is fixed automatically to follow StandardRB?

HeyNonster commented 9 months ago

@HeyNonster hi! can you run rake standard:fix locally so the code style is fixed automatically to follow StandardRB?

@guilleiguaran Done! :)

HeyNonster commented 8 months ago

Seems to all be passing except for the timeout issue that's also present on the main branch! :)

guilleiguaran commented 8 months ago

@HeyNonster thanks!!! I'll fix the timeout issue later this week (or feel free to send a PR for it if you have some spare time :D)

HeyNonster commented 8 months ago

@HeyNonster thanks!!! I'll fix the timeout issue later this week (or feel free to send a PR for it if you have some spare time :D)

@guilleiguaran You probably already saw this, but: https://github.com/testcontainers/testcontainers-ruby/pull/32 🙂