Skip to content

Commit 0c35c64

Browse files
committed
Merge branch 'main' into bug/withwaitstrategydeadline
* main: (48 commits) Fix race condition when looking up reaper (ryuk) container (testcontainers#2508) chore: bring golangci-lint back (testcontainers#2571) docs(compose): Fix typo docker compose docs (testcontainers#2565) Handle error properly during port forwarding initialization. (testcontainers#2550) chore: pin vearch version (testcontainers#2568) feat: add vearch module (testcontainers#2560) chore: run tests against latest Docker engine, nightly (testcontainers#2566) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.4 to 6.0.7 (testcontainers#2562) Fix network accessor for port-forwarding feature (testcontainers#2551) --- (testcontainers#2549) fix: update search bar eval in mkdocs (testcontainers#2547) docs: improve contributing docs for code snippets (testcontainers#2546) chore: use a virtualenv for working with the docs site (testcontainers#2545) docs: document test session semantics (testcontainers#2544) feat(ryuk): allow to configure ryuk timeouts using env variables (testcontainers#2541) docs: fix CircleCI docs (testcontainers#2539) fix: add import to module generation (testcontainers#2537) chore: prepare for next minor development cycle (0.32.0) chore: use new version (v0.31.0) in modules and examples feat(mongodb): add replica set support via opts (testcontainers#2469) ...
2 parents c1851a0 + 0662f1f commit 0c35c64

File tree

244 files changed

+5065
-2044
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+5065
-2044
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/go
33
{
44
"name": "Go",
5-
"image": "mcr.microsoft.com/devcontainers/go:0-1.21-bullseye",
5+
"image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
66

77
// Features to add to the dev container. More info: https://containers.dev/features.
88
// "features": {},

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [testcontainers]

.github/workflows/ci-test-go.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
continue-on-error: ${{ !inputs.fail-fast }}
5151
env:
5252
TESTCONTAINERS_RYUK_DISABLED: "${{ inputs.ryuk-disabled }}"
53+
RYUK_CONNECTION_TIMEOUT: "${{ inputs.project-directory == 'modules/compose' && '5m' || '60s' }}"
54+
RYUK_RECONNECTION_TIMEOUT: "${{ inputs.project-directory == 'modules/compose' && '30s' || '10s' }}"
5355
steps:
5456
- name: Setup rootless Docker
5557
if: ${{ inputs.rootless-docker }}
@@ -70,9 +72,8 @@ jobs:
7072
id: go
7173

7274
- name: golangci-lint
73-
# TODO: Remove each example/module once it passes the golangci-lint
74-
if: ${{ inputs.platform == 'ubuntu-latest' && inputs.go-version == '1.20.x' }}
75-
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
75+
if: ${{ inputs.platform == 'ubuntu-latest' }}
76+
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5
7677
with:
7778
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
7879
version: v1.55.2
@@ -121,7 +122,7 @@ jobs:
121122
./scripts/check_environment.sh
122123
123124
- name: Test Summary
124-
uses: test-summary/action@fee35d7df20790255fe6aa92cf0f6d28092ecf2f # v2
125+
uses: test-summary/action@032c8a9cec6aaa3c20228112cae6ca10a3b29336 # v2.3
125126
with:
126127
paths: "**/${{ inputs.project-directory }}/TEST-unit*.xml"
127128
if: always()

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
matrix:
9595
go-version: [1.21.x, 1.x]
9696
platform: [ubuntu-latest]
97-
module: [artemis, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, dolt, elasticsearch, gcloud, 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, vault, weaviate]
97+
module: [artemis, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, dolt, elasticsearch, gcloud, 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, vault, vearch, weaviate]
9898
uses: ./.github/workflows/ci-test-go.yml
9999
with:
100100
go-version: ${{ matrix.go-version }}
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Tests against Latest Docker Moby
2+
3+
on:
4+
schedule:
5+
# nightly build, at 23:59 CEST
6+
- cron: '59 23 * * *'
7+
8+
jobs:
9+
test_latest_moby:
10+
name: "Core tests using latest moby/moby"
11+
runs-on: 'ubuntu-latest'
12+
steps:
13+
- name: Check out code into the Go module directory
14+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
18+
with:
19+
go-version-file: 'go.mod'
20+
cache-dependency-path: 'go.sum'
21+
id: go
22+
23+
- name: modVerify
24+
run: go mod verify
25+
26+
- name: modTidy
27+
run: go mod tidy
28+
29+
- name: Install Latest Docker
30+
run: curl https://get.docker.com | CHANNEL=test sh
31+
32+
- name: go test
33+
timeout-minutes: 30
34+
run: make test-unit
35+
36+
- name: Create slack payload file
37+
if: failure()
38+
run: |
39+
cat <<EOF > ./payload-slack-content.json
40+
{
41+
"tc_project": "testcontainers-go",
42+
"tc_github_action_url": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}",
43+
"tc_github_action_status": "FAILED",
44+
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"
45+
}
46+
47+
- name: Notify to Slack on failures
48+
if: failure()
49+
id: slack
50+
uses: slackapi/slack-github-action@v1.26.0
51+
with:
52+
payload-file-path: "./payload-slack-content.json"
53+
env:
54+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ src/pip-delete-this-directory.txt
1212

1313
TEST-*.xml
1414

15+
tcvenv
16+
1517
**/go.work

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- misspell
88
- nonamedreturns
99
- testifylint
10+
- errcheck
1011

1112
linters-settings:
1213
errorlint:

.vscode/.testcontainers-go.code-workspace

+4
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@
169169
"name": "module / vault",
170170
"path": "../modules/vault"
171171
},
172+
{
173+
"name": "module / vearch",
174+
"path": "../modules/vearch"
175+
},
172176
{
173177
"name": "module / weaviate",
174178
"path": "../modules/weaviate"

Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,25 @@ test-examples:
1212
tidy-all:
1313
make -C examples tidy-examples
1414
make -C modules tidy-modules
15+
16+
## -------------------------------------
17+
18+
TCENV=tcvenv
19+
PYTHONBIN=./$(TCENV)/bin
20+
21+
tcvenv: tcvenv/touchfile
22+
23+
tcvenv/touchfile:
24+
@echo "Creating docs $(TCENV)..."
25+
test -d $(TCENV) || python3 -m venv $(TCENV)
26+
@echo "Installing requirements..."
27+
. $(PYTHONBIN)/activate; pip install -Ur requirements.txt
28+
touch $(TCENV)/touchfile
29+
30+
clean-docs:
31+
@echo "Destroying docs $(TCENV)..."
32+
rm -rf $(TCENV)
33+
34+
.PHONY: serve-docs
35+
serve-docs: tcvenv
36+
. $(PYTHONBIN)/activate; $(PYTHONBIN)/mkdocs serve

Pipfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ verify_ssl = true
88
[packages]
99
mkdocs = "==1.5.3"
1010
mkdocs-codeinclude-plugin = "==0.2.1"
11-
mkdocs-include-markdown-plugin = "==6.0.4"
12-
mkdocs-material = "==9.5.13"
11+
mkdocs-include-markdown-plugin = "==6.0.7"
12+
mkdocs-material = "==9.5.18"
1313
mkdocs-markdownextradata-plugin = "==0.2.5"
1414

1515
[requires]

0 commit comments

Comments
 (0)