Skip to content

[Enhancement]: Expose common MinIO configuration through the MinIO module #3825

Description

@smsadat1

Proposal

The current MinIO module exposes WithUsername() and WithPassword(), and the official example demonstrates those APIs.

While integrating MinIO into my test suite, I needed to configure additional MinIO-specific settings such as the region and perform bucket creation before running the tests.

At the moment, I had to fall back to generic testcontainers-go APIs (WithEnv, WithAfterReadyCommand, NewRawCommand) to accomplish this.

setupCmd := testcontainers.NewRawCommand([]string{
    "sh", "-c",
    "...",
})

minio.Run(
    ctx,
    image,
    minio.WithUsername(user),
    minio.WithPassword(pass),
    testcontainers.WithEnv(...),
    testcontainers.WithAfterReadyCommand(setupCmd),
)

Since the purpose of the service modules is to provide service-specific abstractions, would it fit the project's design goals to expose additional MinIO-specific helpers, for example:

  • WithRegion()
  • A bucket creation helper (either as a Run() option or a method like miniocontainer.CreateBucket(bucket))

I'm interested in contributing if this direction aligns with the intended API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions