Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion testutils/zk_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ func StartZookeeper(opts ...func(*ZKConfig)) (*ZkControl, error) {

// the container IP is not routable on Darwin, thus needs port
// mapping for the container.
hostConfig := &container.HostConfig{}
hostConfig := &container.HostConfig{
AutoRemove: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of hard-coding this, maybe make it a field in ZKConfig and then you can configure it using a functional option. I'd like to avoid hard-coding new things here.

}
if runtime.GOOS == "darwin" {
hostConfig.PortBindings = nat.PortMap{
nat.Port(fmt.Sprintf("%d/tcp", config.ClientPort)): []nat.PortBinding{{
Expand Down