diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 731826913c..5952d31d52 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
- "image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
+ "image": "mcr.microsoft.com/devcontainers/go:1.22-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5ca90727cb..a7f48d18dd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,7 +26,7 @@ jobs:
test:
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -44,7 +44,7 @@ jobs:
name: "Test with reaper off"
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
uses: ./.github/workflows/ci-test-go.yml
with:
go-version: ${{ matrix.go-version }}
@@ -61,7 +61,7 @@ jobs:
name: "Test with Rootless Docker"
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -76,7 +76,7 @@ jobs:
test-module-generator:
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -92,7 +92,7 @@ jobs:
needs: test
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
module: [artemis, azurite, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, dolt, elasticsearch, gcloud, grafana-lgtm, inbucket, influxdb, k3s, k6, kafka, localstack, mariadb, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, registry, surrealdb, valkey, vault, vearch, weaviate]
uses: ./.github/workflows/ci-test-go.yml
@@ -112,7 +112,7 @@ jobs:
module: [nginx, toxiproxy]
uses: ./.github/workflows/ci-test-go.yml
with:
- go-version: "1.21.x"
+ go-version: "1.22.x"
fail-fast: true
platform: 'ubuntu-latest'
project-directory: examples/${{ matrix.module }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 8919663257..5952e14d60 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -53,7 +53,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
+ uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -67,7 +67,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
+ uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
# âšī¸ Command-line programs to run using the OS shell.
# đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -80,6 +80,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
+ uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 73c657d3c4..d8b8174403 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -51,6 +51,6 @@ jobs:
# required for Code scanning alerts
- name: "Upload SARIF results to code scanning"
- uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
+ uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif
diff --git a/docker_test.go b/docker_test.go
index 9e6cb3fb34..f532d8650f 100644
--- a/docker_test.go
+++ b/docker_test.go
@@ -737,14 +737,10 @@ func TestContainerCreationWaitsForLog(t *testing.T) {
}
func Test_BuildContainerFromDockerfileWithBuildArgs(t *testing.T) {
- t.Log("getting ctx")
ctx := context.Background()
- t.Log("got ctx, creating container request")
-
// fromDockerfileWithBuildArgs {
ba := "build args value"
-
req := ContainerRequest{
FromDockerfile: FromDockerfile{
Context: filepath.Join(".", "testdata"),
@@ -770,23 +766,16 @@ func Test_BuildContainerFromDockerfileWithBuildArgs(t *testing.T) {
terminateContainerOnEnd(t, ctx, c)
ep, err := c.Endpoint(ctx, "http")
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
resp, err := http.Get(ep + "/env")
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
- if err != nil {
- t.Fatal(err)
- }
-
- assert.Equal(t, 200, resp.StatusCode)
- assert.Equal(t, ba, string(body))
+ require.NoError(t, err)
+ require.Equal(t, http.StatusAccepted, resp.StatusCode)
+ require.Equal(t, ba, string(body))
}
func Test_BuildContainerFromDockerfileWithBuildLog(t *testing.T) {
diff --git a/docs/modules/grafana-lgtm.md b/docs/modules/grafana-lgtm.md
index 56e263aac0..b76c56bc66 100644
--- a/docs/modules/grafana-lgtm.md
+++ b/docs/modules/grafana-lgtm.md
@@ -1,6 +1,6 @@
# Grafana LGTM
-Not available until the next release of testcontainers-go :material-tag: main
+Since testcontainers-go :material-tag: v0.33.0
## Introduction
@@ -24,7 +24,7 @@ go get github.com/testcontainers/testcontainers-go/modules/grafanalgtm
### Run function
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
!!!info
The `RunContainer(ctx, opts...)` function is deprecated and will be removed in the next major release of _Testcontainers for Go_.
@@ -50,7 +50,7 @@ E.g. `Run(context.Background(), "grafana/otel-lgtm:0.6.0")`.
#### Admin Credentials
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
If you need to set different admin credentials in the Grafana LGTM container, you can set them using the `WithAdminCredentials(user, password)` option.
@@ -65,37 +65,37 @@ The Grafana LGTM container exposes the following methods:
#### Grafana Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `HttpEndpoint(ctx)` method returns the HTTP endpoint to connect to Grafana, using the default `3000` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
#### Loki Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `LokiEndpoint(ctx)` method returns the HTTP endpoint to connect to Loki, using the default `3100` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
#### Tempo Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `TempoEndpoint(ctx)` method returns the HTTP endpoint to connect to Tempo, using the default `3200` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
#### Otel HTTP Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `OtelHTTPEndpoint(ctx)` method returns the endpoint to connect to Otel using HTTP, using the default `4318` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
#### Otel gRPC Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `OtelGRPCEndpoint(ctx)` method returns the endpoint to connect to Otel using gRPC, using the default `4317` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
#### Prometheus Endpoint
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
The `PrometheusHttpEndpoint(ctx)` method returns the endpoint to connect to Prometheus, using the default `9090` port. The same method with the `Must` prefix returns just the endpoing, and panics if an error occurs.
diff --git a/docs/modules/valkey.md b/docs/modules/valkey.md
index 3210c233cb..40b124f242 100644
--- a/docs/modules/valkey.md
+++ b/docs/modules/valkey.md
@@ -1,6 +1,6 @@
# Valkey
-Not available until the next release of testcontainers-go :material-tag: main
+Since testcontainers-go :material-tag: v0.33.0
## Introduction
@@ -24,7 +24,7 @@ go get github.com/testcontainers/testcontainers-go/modules/valkey
### Run function
-- Not available until the next release of testcontainers-go :material-tag: main
+- Since testcontainers-go :material-tag: v0.33.0
!!!info
The `RunContainer(ctx, opts...)` function is deprecated and will be removed in the next major release of _Testcontainers for Go_.
@@ -52,10 +52,14 @@ E.g. `Run(context.Background(), "valkey/valkey:7.2.5")`.
#### Snapshotting
+- Since testcontainers-go :material-tag: v0.33.0
+
By default Valkey saves snapshots of the dataset on disk, in a binary file called dump.rdb. You can configure Valkey to have it save the dataset every `N` seconds if there are at least `M` changes in the dataset. E.g. `WithSnapshotting(10, 1)`.
#### Log Level
+- Since testcontainers-go :material-tag: v0.33.0
+
You can easily set the valkey logging level. E.g. `WithLogLevel(LogLevelDebug)`.
#### Valkey configuration
@@ -68,6 +72,8 @@ The Valkey container exposes the following methods:
#### ConnectionString
+- Since testcontainers-go :material-tag: v0.33.0
+
This method returns the connection string to connect to the Valkey container, using the default `6379` port.
diff --git a/docs/system_requirements/ci/aws_codebuild.md b/docs/system_requirements/ci/aws_codebuild.md
index 1320e6bdba..a64d3691e0 100644
--- a/docs/system_requirements/ci/aws_codebuild.md
+++ b/docs/system_requirements/ci/aws_codebuild.md
@@ -11,7 +11,7 @@ version: 0.2
phases:
install:
runtime-versions:
- golang: 1.21
+ golang: 1.22
build:
commands:
- go test ./...
diff --git a/docs/system_requirements/ci/concourse_ci.md b/docs/system_requirements/ci/concourse_ci.md
index 2d711d3b73..ede2aac2ae 100644
--- a/docs/system_requirements/ci/concourse_ci.md
+++ b/docs/system_requirements/ci/concourse_ci.md
@@ -36,7 +36,7 @@ jobs:
start_docker
cd repo
- docker run -it --rm -v "$PWD:$PWD" -w "$PWD" -v /var/run/docker.sock:/var/run/docker.sock golang:1.21 go test ./...
+ docker run -it --rm -v "$PWD:$PWD" -w "$PWD" -v /var/run/docker.sock:/var/run/docker.sock golang:1.22 go test ./...
```
Finally, you can use Concourse's [fly CLI](https://concourse-ci.org/fly.html) to set the pipeline and trigger the job:
diff --git a/docs/system_requirements/ci/dind_patterns.md b/docs/system_requirements/ci/dind_patterns.md
index 853a174d32..267a4baaf5 100644
--- a/docs/system_requirements/ci/dind_patterns.md
+++ b/docs/system_requirements/ci/dind_patterns.md
@@ -24,7 +24,7 @@ $ tree .
âââ platform
âââ integration_test.go
-$ docker run -it --rm -v $PWD:$PWD -w $PWD -v /var/run/docker.sock:/var/run/docker.sock golang:1.21 go test ./... -v
+$ docker run -it --rm -v $PWD:$PWD -w $PWD -v /var/run/docker.sock:/var/run/docker.sock golang:1.22 go test ./... -v
```
Where:
@@ -45,7 +45,7 @@ The same can be achieved with Docker Compose:
```yaml
tests:
- image: golang:1.21
+ image: golang:1.22
stop_signal: SIGKILL
stdin_open: true
tty: true
diff --git a/docs/system_requirements/ci/gitlab_ci.md b/docs/system_requirements/ci/gitlab_ci.md
index 6289dc59ae..679292a010 100644
--- a/docs/system_requirements/ci/gitlab_ci.md
+++ b/docs/system_requirements/ci/gitlab_ci.md
@@ -57,7 +57,7 @@ variables:
DOCKER_DRIVER: overlay2
test:
- image: golang:1.21
+ image: golang:1.22
stage: test
script: go test ./... -v
```
diff --git a/docs/system_requirements/ci/tekton.md b/docs/system_requirements/ci/tekton.md
index a8280a0802..28f23f77fb 100644
--- a/docs/system_requirements/ci/tekton.md
+++ b/docs/system_requirements/ci/tekton.md
@@ -16,7 +16,7 @@ spec:
- name: source
steps:
- name: read
- image: golang:1.21
+ image: golang:1.22
workingDir: $(workspaces.source.path)
script: go test ./... -v
volumeMounts:
diff --git a/docs/system_requirements/ci/travis.md b/docs/system_requirements/ci/travis.md
index 0701d2e367..bfc81c303d 100644
--- a/docs/system_requirements/ci/travis.md
+++ b/docs/system_requirements/ci/travis.md
@@ -7,7 +7,7 @@ is the minimal required config.
language: go
go:
- 1.x
-- "1.21"
+- "1.22"
services:
- docker
diff --git a/examples/nginx/go.mod b/examples/nginx/go.mod
index 4852b9d133..a6f67e793c 100644
--- a/examples/nginx/go.mod
+++ b/examples/nginx/go.mod
@@ -1,8 +1,8 @@
module github.com/testcontainers/testcontainers-go/examples/nginx
-go 1.21
+go 1.22
-require github.com/testcontainers/testcontainers-go v0.32.0
+require github.com/testcontainers/testcontainers-go v0.33.0
replace github.com/testcontainers/testcontainers-go => ../..
diff --git a/examples/toxiproxy/go.mod b/examples/toxiproxy/go.mod
index 10f1c0c193..04be7036c1 100644
--- a/examples/toxiproxy/go.mod
+++ b/examples/toxiproxy/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/examples/toxiproxy
-go 1.21
+go 1.22
require (
github.com/Shopify/toxiproxy/v2 v2.8.0
github.com/go-redis/redis/v8 v8.11.5
github.com/google/uuid v1.6.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/go.mod b/go.mod
index fd6a023cb8..678d37ec08 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go
-go 1.21
+go 1.22
require (
dario.cat/mergo v1.0.0
diff --git a/internal/version.go b/internal/version.go
index 3dc9297553..0c688d5e3d 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -1,4 +1,4 @@
package internal
// Version is the next development version of the application
-const Version = "0.33.0"
+const Version = "0.34.0"
diff --git a/mkdocs.yml b/mkdocs.yml
index 1494555b0c..7dc942de52 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -134,4 +134,4 @@ nav:
- Getting help: getting_help.md
edit_uri: edit/main/docs/
extra:
- latest_version: v0.32.0
+ latest_version: v0.33.0
diff --git a/modulegen/_template/ci.yml.tmpl b/modulegen/_template/ci.yml.tmpl
index 616dd2bee6..4b15371337 100644
--- a/modulegen/_template/ci.yml.tmpl
+++ b/modulegen/_template/ci.yml.tmpl
@@ -26,7 +26,7 @@ jobs:
test:
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -44,7 +44,7 @@ jobs:
name: "Test with reaper off"
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
uses: ./.github/workflows/ci-test-go.yml
with:
go-version: {{ "${{ matrix.go-version }}" }}
@@ -61,7 +61,7 @@ jobs:
name: "Test with Rootless Docker"
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -76,7 +76,7 @@ jobs:
test-module-generator:
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
@@ -92,7 +92,7 @@ jobs:
needs: test
strategy:
matrix:
- go-version: [1.21.x, 1.x]
+ go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
module: [{{ .Modules }}]
uses: ./.github/workflows/ci-test-go.yml
@@ -112,7 +112,7 @@ jobs:
module: [{{ .Examples }}]
uses: ./.github/workflows/ci-test-go.yml
with:
- go-version: "1.21.x"
+ go-version: "1.22.x"
fail-fast: true
platform: 'ubuntu-latest'
project-directory: {{ "examples/${{ matrix.module }}" }}
diff --git a/modulegen/go.mod b/modulegen/go.mod
index 613a7c2791..0e66fb16d7 100644
--- a/modulegen/go.mod
+++ b/modulegen/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modulegen
-go 1.21
+go 1.22
require (
github.com/spf13/cobra v1.8.0
diff --git a/modules/artemis/go.mod b/modules/artemis/go.mod
index f89d49fe30..adb9dddf08 100644
--- a/modules/artemis/go.mod
+++ b/modules/artemis/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/artemis
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/go-stomp/stomp/v3 v3.0.5
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/azurite/go.mod b/modules/azurite/go.mod
index 209c4a066f..826a457a9a 100644
--- a/modules/azurite/go.mod
+++ b/modules/azurite/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modules/azurite
-go 1.21
+go 1.22
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
@@ -8,7 +8,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/cassandra/go.mod b/modules/cassandra/go.mod
index ed211d6cd1..fce3c2d919 100644
--- a/modules/cassandra/go.mod
+++ b/modules/cassandra/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/cassandra
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/gocql/gocql v1.6.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/chroma/go.mod b/modules/chroma/go.mod
index 2497b2687d..2c03baa164 100644
--- a/modules/chroma/go.mod
+++ b/modules/chroma/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/chroma
-go 1.21
+go 1.22
require (
github.com/amikos-tech/chroma-go v0.1.2
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/clickhouse/go.mod b/modules/clickhouse/go.mod
index fcb4bb180e..5542929f72 100644
--- a/modules/clickhouse/go.mod
+++ b/modules/clickhouse/go.mod
@@ -1,13 +1,13 @@
module github.com/testcontainers/testcontainers-go/modules/clickhouse
-go 1.21
+go 1.22
require (
github.com/ClickHouse/clickhouse-go/v2 v2.20.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/docker/go-connections v0.5.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/cockroachdb/go.mod b/modules/cockroachdb/go.mod
index 9189455d27..d31c6f54ec 100644
--- a/modules/cockroachdb/go.mod
+++ b/modules/cockroachdb/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/cockroachdb
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/jackc/pgx/v5 v5.5.4
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/compose/go.mod b/modules/compose/go.mod
index df034fb4b5..487bdcb7d0 100644
--- a/modules/compose/go.mod
+++ b/modules/compose/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modules/compose
-go 1.21
+go 1.22
replace github.com/testcontainers/testcontainers-go => ../..
@@ -11,7 +11,7 @@ require (
github.com/docker/docker v27.1.1+incompatible
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
golang.org/x/sync v0.7.0
gopkg.in/yaml.v3 v3.0.1
)
diff --git a/modules/consul/go.mod b/modules/consul/go.mod
index be56e58272..079447aa27 100644
--- a/modules/consul/go.mod
+++ b/modules/consul/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/consul
-go 1.21
+go 1.22
require (
github.com/hashicorp/consul/api v1.27.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/couchbase/go.mod b/modules/couchbase/go.mod
index 7ceb5b8660..96365d44e7 100644
--- a/modules/couchbase/go.mod
+++ b/modules/couchbase/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modules/couchbase
-go 1.21
+go 1.22
toolchain go1.21.7
@@ -8,7 +8,7 @@ require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/couchbase/gocb/v2 v2.7.2
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/tidwall/gjson v1.17.1
)
diff --git a/modules/dolt/go.mod b/modules/dolt/go.mod
index f85df4fdab..804efb8483 100644
--- a/modules/dolt/go.mod
+++ b/modules/dolt/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/dolt
-go 1.21
+go 1.22
require (
github.com/go-sql-driver/mysql v1.7.1
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/elasticsearch/go.mod b/modules/elasticsearch/go.mod
index d062972128..a766e55dd0 100644
--- a/modules/elasticsearch/go.mod
+++ b/modules/elasticsearch/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/elasticsearch
-go 1.21
+go 1.22
require (
github.com/elastic/go-elasticsearch/v8 v8.12.1
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
golang.org/x/mod v0.16.0
)
diff --git a/modules/gcloud/go.mod b/modules/gcloud/go.mod
index 32088e2962..00a723f58c 100644
--- a/modules/gcloud/go.mod
+++ b/modules/gcloud/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modules/gcloud
-go 1.21
+go 1.22
require (
cloud.google.com/go/bigquery v1.59.1
@@ -10,7 +10,7 @@ require (
cloud.google.com/go/pubsub v1.36.2
cloud.google.com/go/spanner v1.57.0
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
google.golang.org/api v0.169.0
google.golang.org/grpc v1.64.1
)
diff --git a/modules/grafana-lgtm/go.mod b/modules/grafana-lgtm/go.mod
index a1cba21836..73a94c714b 100644
--- a/modules/grafana-lgtm/go.mod
+++ b/modules/grafana-lgtm/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/grafanalgtm
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
go.opentelemetry.io/contrib/bridges/otelslog v0.3.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.53.0
go.opentelemetry.io/otel v1.28.0
diff --git a/modules/inbucket/go.mod b/modules/inbucket/go.mod
index 68be24e81a..18939bc445 100644
--- a/modules/inbucket/go.mod
+++ b/modules/inbucket/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/inbucket
-go 1.21
+go 1.22
require (
github.com/inbucket/inbucket v2.0.0+incompatible
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/influxdb/go.mod b/modules/influxdb/go.mod
index abf0e25a9a..f11c1de449 100644
--- a/modules/influxdb/go.mod
+++ b/modules/influxdb/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/influxdb
-go 1.21
+go 1.22
require (
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/k3s/go.mod b/modules/k3s/go.mod
index 2c2fa952a0..da3a23fd92 100644
--- a/modules/k3s/go.mod
+++ b/modules/k3s/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/k3s
-go 1.21
+go 1.22
require (
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
diff --git a/modules/k6/go.mod b/modules/k6/go.mod
index d9eda1b043..58f96d04aa 100644
--- a/modules/k6/go.mod
+++ b/modules/k6/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/k6
-go 1.21
+go 1.22
require (
github.com/docker/docker v27.1.1+incompatible
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/kafka/go.mod b/modules/kafka/go.mod
index 66d66e3663..1148bd00f8 100644
--- a/modules/kafka/go.mod
+++ b/modules/kafka/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/kafka
-go 1.21
+go 1.22
require (
github.com/IBM/sarama v1.42.1
github.com/docker/go-connections v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
golang.org/x/mod v0.16.0
)
diff --git a/modules/localstack/go.mod b/modules/localstack/go.mod
index 5394a23978..0bd92d1a01 100644
--- a/modules/localstack/go.mod
+++ b/modules/localstack/go.mod
@@ -1,6 +1,6 @@
module github.com/testcontainers/testcontainers-go/modules/localstack
-go 1.21
+go 1.22
require (
github.com/aws/aws-sdk-go v1.50.31
@@ -11,7 +11,7 @@ require (
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-connections v0.5.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
golang.org/x/mod v0.16.0
)
diff --git a/modules/mariadb/go.mod b/modules/mariadb/go.mod
index 5840823acf..e8039caf58 100644
--- a/modules/mariadb/go.mod
+++ b/modules/mariadb/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/mariadb
-go 1.21
+go 1.22
require (
github.com/go-sql-driver/mysql v1.7.1
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/milvus/go.mod b/modules/milvus/go.mod
index 09b76b3c02..fa6fa4524d 100644
--- a/modules/milvus/go.mod
+++ b/modules/milvus/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/milvus
-go 1.21
+go 1.22
require (
github.com/milvus-io/milvus-sdk-go/v2 v2.3.6
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/minio/go.mod b/modules/minio/go.mod
index 5b3d42070b..c50c958c21 100644
--- a/modules/minio/go.mod
+++ b/modules/minio/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/minio
-go 1.21
+go 1.22
require (
github.com/minio/minio-go/v7 v7.0.68
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/mockserver/go.mod b/modules/mockserver/go.mod
index c956c7af92..e2ba76d72d 100644
--- a/modules/mockserver/go.mod
+++ b/modules/mockserver/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/mockserver
-go 1.21
+go 1.22
require (
github.com/BraspagDevelopers/mock-server-client v0.2.2
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/mongodb/go.mod b/modules/mongodb/go.mod
index 626023da8d..e7e8c724bc 100644
--- a/modules/mongodb/go.mod
+++ b/modules/mongodb/go.mod
@@ -1,9 +1,9 @@
module github.com/testcontainers/testcontainers-go/modules/mongodb
-go 1.21
+go 1.22
require (
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
go.mongodb.org/mongo-driver v1.13.1
)
diff --git a/modules/mssql/go.mod b/modules/mssql/go.mod
index 561ab41aed..83411fb7aa 100644
--- a/modules/mssql/go.mod
+++ b/modules/mssql/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/mssql
-go 1.21
+go 1.22
require (
github.com/microsoft/go-mssqldb v1.7.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/mysql/go.mod b/modules/mysql/go.mod
index 420d1fa56e..f3f00dcb8b 100644
--- a/modules/mysql/go.mod
+++ b/modules/mysql/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/mysql
-go 1.21
+go 1.22
require (
github.com/go-sql-driver/mysql v1.7.1
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
diff --git a/modules/nats/go.mod b/modules/nats/go.mod
index 7de187bb61..0a4863c41e 100644
--- a/modules/nats/go.mod
+++ b/modules/nats/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/nats
-go 1.21
+go 1.22
require (
github.com/nats-io/nats.go v1.33.1
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/neo4j/go.mod b/modules/neo4j/go.mod
index 01cae82a7f..13f310eeb5 100644
--- a/modules/neo4j/go.mod
+++ b/modules/neo4j/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/neo4j
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/neo4j/neo4j-go-driver/v5 v5.18.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/ollama/go.mod b/modules/ollama/go.mod
index 73fd510df4..5e586e858e 100644
--- a/modules/ollama/go.mod
+++ b/modules/ollama/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/ollama
-go 1.21
+go 1.22
require (
github.com/docker/docker v27.1.1+incompatible
github.com/google/uuid v1.6.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/tmc/langchaingo v0.1.5
)
diff --git a/modules/openfga/go.mod b/modules/openfga/go.mod
index d9ce4b4efd..388b9c040c 100644
--- a/modules/openfga/go.mod
+++ b/modules/openfga/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/openfga
-go 1.21
+go 1.22
require (
github.com/openfga/go-sdk v0.3.5
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/openldap/go.mod b/modules/openldap/go.mod
index 69ec47711c..2f13ed78cc 100644
--- a/modules/openldap/go.mod
+++ b/modules/openldap/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/openldap
-go 1.21
+go 1.22
require (
github.com/go-ldap/ldap/v3 v3.4.6
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/opensearch/go.mod b/modules/opensearch/go.mod
index c65559d3e1..50146f5964 100644
--- a/modules/opensearch/go.mod
+++ b/modules/opensearch/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/opensearch
-go 1.21
+go 1.22
require (
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-units v0.5.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/postgres/go.mod b/modules/postgres/go.mod
index 83677326b7..4b57997260 100644
--- a/modules/postgres/go.mod
+++ b/modules/postgres/go.mod
@@ -1,13 +1,13 @@
module github.com/testcontainers/testcontainers-go/modules/postgres
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/jackc/pgx/v5 v5.5.4
github.com/lib/pq v1.10.9
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
diff --git a/modules/pulsar/go.mod b/modules/pulsar/go.mod
index 20fd5455bf..b9e77f4d58 100644
--- a/modules/pulsar/go.mod
+++ b/modules/pulsar/go.mod
@@ -1,13 +1,13 @@
module github.com/testcontainers/testcontainers-go/modules/pulsar
-go 1.21
+go 1.22
require (
github.com/apache/pulsar-client-go v0.10.0
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-connections v0.5.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
replace github.com/testcontainers/testcontainers-go => ../..
diff --git a/modules/qdrant/go.mod b/modules/qdrant/go.mod
index d3fbac9f76..85db7229b3 100644
--- a/modules/qdrant/go.mod
+++ b/modules/qdrant/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/qdrant
-go 1.21
+go 1.22
require (
github.com/qdrant/go-client v1.7.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
google.golang.org/grpc v1.64.1
)
diff --git a/modules/rabbitmq/go.mod b/modules/rabbitmq/go.mod
index c5b5784ccb..e9d4a267fa 100644
--- a/modules/rabbitmq/go.mod
+++ b/modules/rabbitmq/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/rabbitmq
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/rabbitmq/amqp091-go v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/redis/go.mod b/modules/redis/go.mod
index 0c655fe5c4..e76c925c7e 100644
--- a/modules/redis/go.mod
+++ b/modules/redis/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/redis
-go 1.21
+go 1.22
require (
github.com/go-redis/redis/v8 v8.11.5
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
diff --git a/modules/redpanda/go.mod b/modules/redpanda/go.mod
index deb901ccaa..4ce12872ee 100644
--- a/modules/redpanda/go.mod
+++ b/modules/redpanda/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/redpanda
-go 1.21
+go 1.22
require (
github.com/docker/go-connections v0.5.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/twmb/franz-go v1.16.1
github.com/twmb/franz-go/pkg/kadm v1.11.0
golang.org/x/mod v0.16.0
diff --git a/modules/registry/go.mod b/modules/registry/go.mod
index 6aa887050c..36e95dfdf0 100644
--- a/modules/registry/go.mod
+++ b/modules/registry/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/registry
-go 1.21
+go 1.22
require (
github.com/cpuguy83/dockercfg v0.3.1
github.com/docker/docker v27.1.1+incompatible
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/surrealdb/go.mod b/modules/surrealdb/go.mod
index 8411ee4e79..d3d2d049d6 100644
--- a/modules/surrealdb/go.mod
+++ b/modules/surrealdb/go.mod
@@ -1,10 +1,10 @@
module github.com/testcontainers/testcontainers-go/modules/surrealdb
-go 1.21
+go 1.22
require (
github.com/surrealdb/surrealdb.go v0.2.1
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
)
require (
diff --git a/modules/valkey/go.mod b/modules/valkey/go.mod
index 6d394c5c16..0c1173f987 100644
--- a/modules/valkey/go.mod
+++ b/modules/valkey/go.mod
@@ -1,11 +1,11 @@
module github.com/testcontainers/testcontainers-go/modules/valkey
-go 1.21
+go 1.22
require (
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/valkey-io/valkey-go v1.0.41
)
diff --git a/modules/vault/go.mod b/modules/vault/go.mod
index 6e04cb687e..064a23bcce 100644
--- a/modules/vault/go.mod
+++ b/modules/vault/go.mod
@@ -1,12 +1,12 @@
module github.com/testcontainers/testcontainers-go/modules/vault
-go 1.21
+go 1.22
require (
github.com/docker/docker v27.1.1+incompatible
github.com/hashicorp/vault-client-go v0.4.3
github.com/stretchr/testify v1.9.0
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/tidwall/gjson v1.17.1
)
diff --git a/modules/vearch/go.mod b/modules/vearch/go.mod
index 026ba37349..eaad237db7 100644
--- a/modules/vearch/go.mod
+++ b/modules/vearch/go.mod
@@ -2,7 +2,7 @@ module github.com/testcontainers/testcontainers-go/modules/vearch
go 1.22.0
-require github.com/testcontainers/testcontainers-go v0.32.0
+require github.com/testcontainers/testcontainers-go v0.33.0
require (
dario.cat/mergo v1.0.0 // indirect
diff --git a/modules/weaviate/go.mod b/modules/weaviate/go.mod
index 83e386cdfe..6572fb3607 100644
--- a/modules/weaviate/go.mod
+++ b/modules/weaviate/go.mod
@@ -1,9 +1,9 @@
module github.com/testcontainers/testcontainers-go/modules/weaviate
-go 1.21
+go 1.22
require (
- github.com/testcontainers/testcontainers-go v0.32.0
+ github.com/testcontainers/testcontainers-go v0.33.0
github.com/weaviate/weaviate-go-client/v4 v4.13.1
google.golang.org/grpc v1.64.1
)
diff --git a/scripts/bump-go.sh b/scripts/bump-go.sh
index 7b949ee89b..5ff33a5e6e 100755
--- a/scripts/bump-go.sh
+++ b/scripts/bump-go.sh
@@ -21,7 +21,7 @@ readonly CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
readonly DRY_RUN="${DRY_RUN:-true}"
readonly ROOT_DIR="$(dirname "$CURRENT_DIR")"
readonly GO_MOD_FILE="${ROOT_DIR}/go.mod"
-readonly DEVCONTAINER_IMAGE_PREFIX="go:0-"
+readonly DEVCONTAINER_IMAGE_PREFIX="go:"
function main() {
echo "Updating Go version:"
diff --git a/sonar-project.properties b/sonar-project.properties
index d93e935f5f..aaa203e905 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -7,7 +7,7 @@ sonar.projectKey=testcontainers_testcontainers-go
sonar.projectName=testcontainers-go
-sonar.projectVersion=v0.32.0
+sonar.projectVersion=v0.33.0
sonar.sources=.
diff --git a/testdata/echoserver.go b/testdata/echoserver.go
index db5798699a..a62c783f5d 100644
--- a/testdata/echoserver.go
+++ b/testdata/echoserver.go
@@ -10,9 +10,8 @@ import (
func envHandler() http.HandlerFunc {
return func(rw http.ResponseWriter, req *http.Request) {
- _, _ = rw.Write([]byte(os.Getenv("FOO")))
-
rw.WriteHeader(http.StatusAccepted)
+ rw.Write([]byte(os.Getenv("FOO"))) //nolint:errcheck // Nothing we can usefully do with the error here.
}
}
@@ -21,9 +20,7 @@ func echoHandler(destination *os.File) http.HandlerFunc {
echo := req.URL.Query()["echo"][0]
l := log.New(destination, "echo ", 0)
-
l.Println(echo)
- _ = destination.Sync()
rw.WriteHeader(http.StatusAccepted)
}
@@ -39,10 +36,12 @@ func main() {
ln, err := net.Listen("tcp", ":8080")
if err != nil {
- panic(err)
+ log.Fatal(err)
}
fmt.Println("ready")
- _ = http.Serve(ln, mux)
+ if err := http.Serve(ln, mux); err != nil {
+ log.Fatal(err)
+ }
}
diff --git a/wait/testdata/go.mod b/wait/testdata/go.mod
index 0b51175838..ab1b280416 100644
--- a/wait/testdata/go.mod
+++ b/wait/testdata/go.mod
@@ -1,3 +1,3 @@
module httptest
-go 1.21
+go 1.22
diff --git a/wait/testdata/main.go b/wait/testdata/main.go
index b18008db75..f6f965fe6b 100644
--- a/wait/testdata/main.go
+++ b/wait/testdata/main.go
@@ -5,6 +5,7 @@ import (
"context"
"encoding/base64"
"errors"
+ "fmt"
"io"
"log"
"net/http"
@@ -15,7 +16,7 @@ import (
"time"
)
-func main() {
+func run() error {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusOK)
@@ -93,5 +94,15 @@ func main() {
log.Println("stopping...")
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
- _ = server.Shutdown(ctx)
+ if err := server.Shutdown(ctx); err != nil {
+ return fmt.Errorf("shutdown: %w", err)
+ }
+
+ return nil
+}
+
+func main() {
+ if err := run(); err != nil {
+ log.Fatal(err)
+ }
}