Annotation Interface PostgresIT
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@SpringBootTest
@ActiveProfiles("test")
@Import({PostgresTestConfiguration.class,KeyEncryptionTestConfiguration.class})
public @interface PostgresIT
Meta-annotation for integration tests backed by a PostgreSQL Testcontainers container.
Annotating an
*IT class with it starts a Spring Boot test context wired to the container, with the
test profile active (it selects test-only adapters, such as the logging SMS sender of auth-server,
which a deployment never gets by default). A test class that declares @ActiveProfiles itself replaces it.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionorg.springframework.boot.test.context.SpringBootTest.WebEnvironmentWeb environment of the test context, forwarded toSpringBootTest.webEnvironment().
-
Element Details
-
webEnvironment
@AliasFor(annotation=org.springframework.boot.test.context.SpringBootTest.class, attribute="webEnvironment") org.springframework.boot.test.context.SpringBootTest.WebEnvironment webEnvironmentWeb environment of the test context, forwarded toSpringBootTest.webEnvironment().- Returns:
- the web environment, a mock one by default.
- Default:
MOCK
-