Skip to content

Commit 65b7c6d

Browse files
committed
Merge branch 'main' into fix-reuse-stopped-container
* main: chore(deps): bump mkdocs-include-markdown-plugin from 6.2.2 to 7.1.5 (testcontainers#3119) chore(deps): bump github.com/magiconair/properties from 1.8.9 to 1.8.10 (testcontainers#3118) chore(ci): exclude more files for a full-blown build (testcontainers#3122) feat(influxdb): support for influxdbv2 (testcontainers#3072)
2 parents 1c2cd3b + d7c1a2f commit 65b7c6d

File tree

125 files changed

+911
-252
lines changed

Some content is hidden

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

125 files changed

+911
-252
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ verify_ssl = true
88
[packages]
99
mkdocs = "==1.5.3"
1010
mkdocs-codeinclude-plugin = "==0.2.1"
11-
mkdocs-include-markdown-plugin = "==6.2.2"
11+
mkdocs-include-markdown-plugin = "==7.1.5"
1212
mkdocs-material = "==9.5.18"
1313
mkdocs-markdownextradata-plugin = "==0.2.6"
1414

Pipfile.lock

Lines changed: 62 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/modules/influxdb.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Since testcontainers-go <a href="https://github.com/testcontainers/testcontainer
44

55
## Introduction
66

7-
A testcontainers module for InfluxDB. This module supports v1.x of InfluxDB.
7+
A testcontainers module for InfluxDB V1 and V2.
88

99
## Adding this module to your project dependencies
1010

@@ -16,8 +16,11 @@ go get github.com/testcontainers/testcontainers-go/modules/influxdb
1616

1717
## Usage example
1818

19+
### InfluxDB
20+
1921
<!--codeinclude-->
20-
[Creating an InfluxDB container](../../modules/influxdb/examples_test.go) inside_block:runInfluxContainer
22+
[Creating an InfluxDB V1 container](../../modules/influxdb/examples_test.go) inside_block:runInfluxContainer
23+
[Creating an InfluxDB V2 container](../../modules/influxdb/examples_test.go) inside_block:runInfluxV2Container
2124
<!--/codeinclude-->
2225

2326
## Module Reference
@@ -54,7 +57,7 @@ Use the second argument in the `Run` function to set a valid Docker image.
5457
In example: `Run(context.Background(), "influxdb:1.8.0")`.
5558

5659
!!!info
57-
Note that `influxdb:latest` will get you a version 2 image which is not supported by this module.
60+
Note that `influxdb:latest` will pull a version 2 image.
5861

5962
{% include "../features/common_functional_options.md" %}
6063

@@ -63,6 +66,20 @@ In example: `Run(context.Background(), "influxdb:1.8.0")`.
6366
By default, authentication is disabled and no credentials are needed to use the Influx API against the test container.
6467
If you want to test with credentials, include the appropriate environment variables to do so.
6568

69+
#### Configuring InfluxDB V2
70+
71+
- Not available until the next release of testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go"><span class="tc-version">:material-tag: main</span></a>
72+
73+
When running the InfluxDB V2 image, you can override the default configuration by using options prefixed by `influxdb.WithV2`.
74+
The following options are available:
75+
76+
- `WithV2(org, bucket string)`: Configures organization and bucket name. This option is required to run the InfluxDB V2 image.
77+
- `WithV2Auth(org, bucket, username, password string)`: Sets the username and password for the initial user.
78+
- `WithV2SecretsAuth(org, bucket, usernameFile, passwordFile string)`: Sets the username and password file path.
79+
- `WithV2Retention(retention time.Duration)`: Sets the default bucket retention policy.
80+
- `WithV2AdminToken(token string)`: Sets the admin token for the initial user.
81+
- `WithV2SecretsAdminToken(tokenFile string)`: Sets the admin token file path.
82+
6683
#### Init Scripts
6784

6885
While the InfluxDB image will obey the `/docker-entrypoint-initdb.d` directory as is common, that directory does not

examples/nginx/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ require (
3333
github.com/google/uuid v1.6.0 // indirect
3434
github.com/klauspost/compress v1.17.4 // indirect
3535
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
36-
github.com/magiconair/properties v1.8.9 // indirect
36+
github.com/magiconair/properties v1.8.10 // indirect
3737
github.com/moby/docker-image-spec v1.3.1 // indirect
3838
github.com/moby/patternmatcher v0.6.0 // indirect
3939
github.com/moby/sys/sequential v0.5.0 // indirect

examples/nginx/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
5757
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
5858
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
5959
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
60-
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
61-
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
60+
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
61+
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
6262
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
6363
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
6464
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/docker/docker v28.0.1+incompatible
1313
github.com/docker/go-connections v0.5.0
1414
github.com/google/uuid v1.6.0
15-
github.com/magiconair/properties v1.8.9
15+
github.com/magiconair/properties v1.8.10
1616
github.com/moby/patternmatcher v0.6.0
1717
github.com/moby/term v0.5.0
1818
github.com/opencontainers/image-spec v1.1.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
5757
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
5858
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
5959
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
60-
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
61-
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
60+
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
61+
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
6262
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
6363
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
6464
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=

modules/aerospike/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
github.com/google/uuid v1.6.0 // indirect
3131
github.com/klauspost/compress v1.17.4 // indirect
3232
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
33-
github.com/magiconair/properties v1.8.9 // indirect
33+
github.com/magiconair/properties v1.8.10 // indirect
3434
github.com/moby/docker-image-spec v1.3.1 // indirect
3535
github.com/moby/patternmatcher v0.6.0 // indirect
3636
github.com/moby/sys/sequential v0.5.0 // indirect

modules/aerospike/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
6363
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
6464
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
6565
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
66-
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
67-
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
66+
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
67+
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
6868
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
6969
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
7070
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=

0 commit comments

Comments
 (0)