Skip to content

Commit a06c441

Browse files
committed
fix(modules.gcloud): pass as ptr to allow request customization
1 parent 204d7db commit a06c441

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

modules/gcloud/bigquery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func RunBigQueryContainer(ctx context.Context, opts ...testcontainers.ContainerC
2020
Started: true,
2121
}
2222

23-
settings := applyOptions(req, opts)
23+
settings := applyOptions(&req, opts)
2424

2525
req.Cmd = []string{"--project", settings.ProjectID}
2626

modules/gcloud/bigtable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RunBigTableContainer(ctx context.Context, opts ...testcontainers.ContainerC
1919
Started: true,
2020
}
2121

22-
settings := applyOptions(req, opts)
22+
settings := applyOptions(&req, opts)
2323

2424
req.Cmd = []string{
2525
"/bin/sh",

modules/gcloud/datastore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RunDatastoreContainer(ctx context.Context, opts ...testcontainers.Container
1919
Started: true,
2020
}
2121

22-
settings := applyOptions(req, opts)
22+
settings := applyOptions(&req, opts)
2323

2424
req.Cmd = []string{
2525
"/bin/sh",

modules/gcloud/firestore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RunFirestoreContainer(ctx context.Context, opts ...testcontainers.Container
1919
Started: true,
2020
}
2121

22-
settings := applyOptions(req, opts)
22+
settings := applyOptions(&req, opts)
2323

2424
req.Cmd = []string{
2525
"/bin/sh",

modules/gcloud/gcloud.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func WithProjectID(projectID string) Option {
6969
}
7070

7171
// applyOptions applies the options to the container request and returns the settings.
72-
func applyOptions(req testcontainers.GenericContainerRequest, opts []testcontainers.ContainerCustomizer) options {
72+
func applyOptions(req *testcontainers.GenericContainerRequest, opts []testcontainers.ContainerCustomizer) options {
7373
settings := defaultOptions()
7474
for _, opt := range opts {
7575
if apply, ok := opt.(Option); ok {
7676
apply(&settings)
7777
}
78-
opt.Customize(&req)
78+
opt.Customize(req)
7979
}
8080

8181
return settings

modules/gcloud/pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RunPubsubContainer(ctx context.Context, opts ...testcontainers.ContainerCus
1919
Started: true,
2020
}
2121

22-
settings := applyOptions(req, opts)
22+
settings := applyOptions(&req, opts)
2323

2424
req.Cmd = []string{
2525
"/bin/sh",

modules/gcloud/spanner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func RunSpannerContainer(ctx context.Context, opts ...testcontainers.ContainerCu
1818
Started: true,
1919
}
2020

21-
settings := applyOptions(req, opts)
21+
settings := applyOptions(&req, opts)
2222

2323
container, err := testcontainers.GenericContainer(ctx, req)
2424
if err != nil {

0 commit comments

Comments
 (0)