Skip to content

Commit

Permalink
chore(cockroachdb): remove customizer
Browse files Browse the repository at this point in the history
Remove the now unused customizer.
  • Loading branch information
stevenh committed Nov 8, 2024
1 parent 48aa4b7 commit 8e648ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions modules/cockroachdb/cockroachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
}

for _, opt := range opts {
if fn, ok := opt.(customizer); ok {
if err := fn.customize(ctr); err != nil {
return nil, fmt.Errorf("customize container: %w", err)
}
}
if err := opt.Customize(&req); err != nil {
return nil, fmt.Errorf("customize request: %w", err)
}
Expand Down
5 changes: 0 additions & 5 deletions modules/cockroachdb/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import (
// errInsecureWithPassword is returned when trying to use insecure mode with a password.
var errInsecureWithPassword = errors.New("insecure mode cannot be used with a password")

// customizer is an interface for customizing a CockroachDB container.
type customizer interface {
customize(*CockroachDBContainer) error
}

// WithDatabase sets the name of the database to create and use.
// This will be converted to lowercase as CockroachDB forces the database to be lowercase.
// The database creation will be skipped if data exists in the `/cockroach/cockroach-data` directory within the container.
Expand Down

0 comments on commit 8e648ad

Please sign in to comment.