You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/cassandra.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,9 @@ In example: `Run(context.Background(), "cassandra:4.1.3")`.
48
48
49
49
When starting the Cassandra container, you can pass options in a variadic way to configure it.
50
50
51
-
#### Init Scripts
51
+
#### WithInitScripts
52
+
53
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
52
54
53
55
If you would like to do additional initialization in the Cassandra container, add one or more `*.cql` or `*.sh` scripts to the container request with the `WithInitScripts` function.
54
56
Those files will be copied after the container is created but before it's started under root directory.
@@ -59,7 +61,9 @@ An example of a `*.sh` script that creates a keyspace and table is shown below:
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
63
67
64
68
In the case you have a custom config file for Cassandra, it's possible to copy that file into the container before it's started, using the `WithConfigFile(cfgPath string)` function.
65
69
@@ -74,6 +78,8 @@ The Cassandra container exposes the following methods:
74
78
75
79
#### ConnectionHost
76
80
81
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.26.0"><span class="tc-version">:material-tag: v0.26.0</span></a>
82
+
77
83
This method returns the host and port of the Cassandra container, using the default, `9042/tcp` port. E.g. `localhost:9042`
Copy file name to clipboardExpand all lines: docs/modules/clickhouse.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,13 +58,17 @@ When starting the ClickHouse container, you can pass options in a variadic way t
58
58
59
59
#### Set username, password and database name
60
60
61
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
62
+
61
63
If you need to set a different database, and its credentials, you can use `WithUsername`, `WithPassword`, `WithDatabase`
62
64
options. E.g. `WithUsername("user")`, `WithPassword("password")`, `WithDatabase("db")`.
63
65
64
66
!!!info
65
67
The default values for the username is `default`, for password is `clickhouse` and for the default database name is `clickhouse`.
66
68
67
-
#### Init Scripts
69
+
#### WithInitScripts
70
+
71
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
68
72
69
73
If you would like to do additional initialization in the ClickHouse container, add one or more `*.sql`, `*.sql.gz`, or `*.sh` scripts to the container request.
70
74
Those files will be copied after the container is created but before it's started under `/docker-entrypoint-initdb.d`. According to ClickHouse Docker image,
@@ -81,6 +85,8 @@ initialization before starting the service.
81
85
82
86
#### Zookeeper
83
87
88
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
89
+
84
90
Clusterized ClickHouse requires to start Zookeeper and pass link to it via `config.xml`.
85
91
86
92
<!--codeinclude-->
@@ -90,7 +96,9 @@ Clusterized ClickHouse requires to start Zookeeper and pass link to it via `conf
90
96
!!!warning
91
97
The `WithZookeeper` option will `panic` if it's not possible to create the Zookeeper config file.
92
98
93
-
#### Custom configuration
99
+
#### WithConfigFile
100
+
101
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
94
102
95
103
If you need to set a custom configuration, the module provides the `WithConfigFile` option to pass the path to a custom configuration file in XML format.
96
104
@@ -112,6 +120,8 @@ The ClickHouse container exposes the following methods:
112
120
113
121
#### ConnectionHost
114
122
123
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
124
+
115
125
This method returns the host and port of the ClickHouse container, using the default, native `9000/tcp` port. E.g. `localhost:9000`
116
126
117
127
<!--codeinclude-->
@@ -120,6 +130,8 @@ This method returns the host and port of the ClickHouse container, using the def
120
130
121
131
#### ConnectionString
122
132
133
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.23.0"><span class="tc-version">:material-tag: v0.23.0</span></a>
134
+
123
135
This method returns the dsn connection string to connect to the ClickHouse container, using the default, native `9000/tcp` port obtained from the `ConnectionHost` method.
124
136
It's possible to pass extra parameters to the connection string, e.g. `dial_timeout=300ms` or `skip_verify=false`, in a variadic way.
Copy file name to clipboardExpand all lines: docs/modules/cockroachdb.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,59 +48,81 @@ When starting the CockroachDB container, you can pass options in a variadic way
48
48
Use the second argument in the `Run` function to set a valid Docker image.
49
49
In example: `Run(context.Background(), "cockroachdb/cockroach:latest-v23.1")`.
50
50
51
-
{% include "../features/common_functional_options_list.md" %}
52
-
53
51
#### Database
54
52
53
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
54
+
55
55
Set the database that is created & dialled with `cockroachdb.WithDatabase`.
56
56
57
57
#### User and Password
58
58
59
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
60
+
59
61
You can configure the container to create a user with a password by setting `cockroachdb.WithUser` and `cockroachdb.WithPassword`.
60
62
61
63
`cockroachdb.WithPassword` is incompatible with `cockroachdb.WithInsecure`.
62
64
63
65
#### Store size
64
66
67
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
68
+
65
69
Control the maximum amount of memory used for storage, by default this is 100% but can be changed by provided a valid option to `WithStoreSize`. Checkout https://www.cockroachlabs.com/docs/stable/cockroach-start#store for the full range of options available.
66
70
67
71
#### TLS authentication
68
72
73
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
74
+
69
75
`cockroachdb.WithInsecure` lets you disable the use of TLS on connections.
70
76
71
77
`cockroachdb.WithInsecure` is incompatible with `cockroachdb.WithPassword`.
72
78
73
79
#### Initialization Scripts
74
80
81
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
82
+
75
83
`cockroachdb.WithInitScripts` adds the given scripts to those automatically run when the container starts.
76
84
These will be ignored if data exists in the `/cockroach/cockroach-data` directory within the container.
77
85
86
+
#### No Cluster Defaults
87
+
88
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.35.0"><span class="tc-version">:material-tag: v0.35.0</span></a>
89
+
78
90
`cockroachdb.WithNoClusterDefaults` disables the default cluster settings script.
79
91
80
92
Without this option Cockroach containers run `data/cluster-defaults.sql` on startup
81
93
which configures the settings recommended by Cockroach Labs for
Copy file name to clipboardExpand all lines: docs/modules/consul.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,8 @@ When starting the Consul container, you can pass options in a variadic way to co
50
50
51
51
#### Configuration File
52
52
53
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
54
+
53
55
If you need to customize the behavior for the deployed node you can use either `WithConfigString(config string)` or `WithConfigFile(configPath string)`.
54
56
The configuration has to be in JSON format and will be loaded at the node startup.
55
57
@@ -61,6 +63,8 @@ The Consul container exposes the following method:
61
63
62
64
#### ApiEndpoint
63
65
66
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
67
+
64
68
This method returns the connection string to connect to the Consul container API, using the default`8500` port.
Copy file name to clipboardExpand all lines: docs/modules/couchbase.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,8 @@ When starting the Couchbase container, you can pass options in a variadic way to
84
84
85
85
#### Credentials
86
86
87
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
88
+
87
89
If you need to change the default credentials for the admin user, you can use `WithAdminCredentials(user, password)` with a valid username and password.
88
90
When the password has less than 6 characters, the container won't be created and the `New` function will throw an error.
89
91
@@ -92,6 +94,8 @@ When the password has less than 6 characters, the container won't be created and
92
94
93
95
#### Buckets
94
96
97
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
98
+
95
99
When creating a new Couchbase container, you can create one or more buckets. The module exposes a `WithBuckets` optional function that accepts a slice of buckets to be created.
96
100
To create a new bucket, the module also exposes a `NewBucket` function, where you can pass the bucket name.
97
101
@@ -108,6 +112,8 @@ It's possible to customize a newly created bucket, using the following options:
108
112
109
113
#### Index Storage
110
114
115
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
116
+
111
117
It's possible to set the storage mode to be used for all global secondary indexes in the cluster.
112
118
113
119
!!!warning
@@ -119,6 +125,8 @@ It's possible to set the storage mode to be used for all global secondary indexe
119
125
120
126
#### Services
121
127
128
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
129
+
122
130
By default, the container will start with the following services: `kv`, `n1ql`, `fts` and `index`.
123
131
124
132
!!!warning
@@ -131,13 +139,19 @@ By default, the container will start with the following services: `kv`, `n1ql`,
131
139
132
140
#### ConnectionString
133
141
142
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
143
+
134
144
The `ConnectionString` method returns the connection string to connect to the Couchbase container instance.
135
145
It returns a string with the format `couchbase://<host>:<port>`.
136
146
137
147
#### Username
138
148
149
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
150
+
139
151
The `Username` method returns the username of the Couchbase administrator.
140
152
141
153
#### Password
142
154
155
+
- Since <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
156
+
143
157
The `Password` method returns the password of the Couchbase administrator.
0 commit comments