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: doc/user-guide.adoc
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -294,10 +294,15 @@ hdfsWeb = 9870
294
294
295
295
Typed service options should cover the normal path, but integration-test containers sometimes need image-specific workarounds before the framework has first-class support. Use container customizations as an escape hatch for troubleshooting or temporary overrides.
296
296
297
+
Container customizations run before the service container starts. Use them for Docker/Testcontainers-level concerns such as network mode, extra ports, environment variables, copied files, host mounts, image-specific startup flags, and temporary workarounds. Use extensions for post-start provisioning such as creating buckets, generating JCEKS files, creating Kafka topics, or producing seed records.
298
+
297
299
TOML supports environment variables, copied files, host mounts, and extra exposed ports:
For cases that cannot be represented declaratively, use the Testcontainers callback. The callback runs after `bigdata-test` applies its built-in container settings and before the container starts:
350
374
351
375
[source,kotlin]
@@ -358,6 +382,18 @@ val kit = BigDataTestKit.builder()
358
382
.build()
359
383
----
360
384
385
+
The callback receives the actual `GenericContainer<*>`, so users can call Testcontainers APIs directly. This is the most flexible workaround path when `bigdata-test` does not expose a typed option yet. For example, before `networkMode` was first-class, the same host-network workaround could be written as:
Do not use the callback as the normal configuration API for reusable tests. If a setting is stable and generally useful, prefer a typed option or TOML field so it can be documented, data-driven from Gradle tasks, and used from Java.
0 commit comments