Package org.testcontainers.utility
Class TestcontainersConfiguration
java.lang.Object
org.testcontainers.utility.TestcontainersConfiguration
Provides a mechanism for fetching configuration/default settings.
Configuration may be provided in:
- A file in the user's home directory named
.testcontainers.properties - A file in the classpath named
testcontainers.properties - Environment variables
Note that, if using environment variables, property names are in upper case separated by underscores, preceded by
TESTCONTAINERS_.
-
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanbooleanDeprecated.Deprecated.getEnvVarOrProperty(@NotNull String propertyName, @Nullable String defaultValue) Gets a configured setting from an environment variable (if present) or a configuration file property otherwise.getEnvVarOrUserProperty(@NotNull String propertyName, @Nullable String defaultValue) Gets a configured setting from an environment variable (if present) or a configuration file property otherwise.static TestcontainersConfigurationDeprecated.Deprecated.Deprecated.Deprecated.usages should be removed ASAP.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.getUserProperty(@NotNull String propertyName, @Nullable String defaultValue) Gets a configured setting from~/.testcontainers.properties.Deprecated.inthashCode()booleanbooleantoString()booleanupdateGlobalConfig(@NonNull String prop, @NonNull String value) Deprecated.booleanupdateUserConfig(@NonNull String prop, @NonNull String value)
-
Method Details
-
getAmbassadorContainerImage
Deprecated. -
getSocatContainerImage
Deprecated. -
getVncRecordedContainerImage
Deprecated. -
getDockerComposeContainerImage
Deprecated. -
getTinyImage
Deprecated. -
isRyukPrivileged
public boolean isRyukPrivileged() -
getRyukImage
Deprecated. -
getSSHdImage
Deprecated. -
getRyukTimeout
-
getKafkaImage
Deprecated. -
getOracleImage
Deprecated. -
getPulsarImage
Deprecated. -
getLocalStackImage
Deprecated. -
isDisableChecks
public boolean isDisableChecks() -
environmentSupportsReuse
-
getDockerClientStrategyClassName
-
getTransportType
-
getImagePullPauseTimeout
-
getImagePullTimeout
-
getImageSubstitutorClassName
-
getImagePullPolicy
-
getClientPingTimeout
-
getEnvVarOrProperty
@Contract("_, !null -> !null") public String getEnvVarOrProperty(@NotNull @NotNull String propertyName, @Nullable @Nullable String defaultValue) Gets a configured setting from an environment variable (if present) or a configuration file property otherwise. The configuration file will be the.testcontainers.propertiesfile in the user's home directory or atestcontainers.propertiesfound on the classpath.Note that when searching environment variables, the prefix `TESTCONTAINERS_` will usually be applied to the property name, which will be converted to upper-case with underscore separators. This prefix will not be added if the property name begins `docker.`.
- Parameters:
propertyName- name of configuration file property (dot-separated lower case)- Returns:
- the found value, or null if not set
-
getEnvVarOrUserProperty
@Contract("_, !null -> !null") public String getEnvVarOrUserProperty(@NotNull @NotNull String propertyName, @Nullable @Nullable String defaultValue) Gets a configured setting from an environment variable (if present) or a configuration file property otherwise. The configuration file will be the.testcontainers.propertiesfile in the user's home directory.Note that when searching environment variables, the prefix `TESTCONTAINERS_` will usually be applied to the property name, which will be converted to upper-case with underscore separators. This prefix will not be added if the property name begins `docker.`.
- Parameters:
propertyName- name of configuration file property (dot-separated lower case)- Returns:
- the found value, or null if not set
-
getUserProperty
@Contract("_, !null -> !null") public String getUserProperty(@NotNull @NotNull String propertyName, @Nullable @Nullable String defaultValue) Gets a configured setting from~/.testcontainers.properties.- Parameters:
propertyName- name of configuration file property (dot-separated lower case)- Returns:
- the found value, or null if not set
-
getProperties
Deprecated.usages should be removed ASAP. SeegetEnvVarOrProperty(String, String),getEnvVarOrUserProperty(String, String)orgetUserProperty(String, String)for suitable replacements.- Returns:
- properties values available from user properties and classpath properties. Values set by environment variable are NOT included.
-
updateGlobalConfig
@Deprecated public boolean updateGlobalConfig(@NonNull @NonNull String prop, @NonNull @NonNull String value) Deprecated. -
updateUserConfig
-
getUserProperties
-
getClasspathProperties
-
getEnvironment
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getInstance
-