Package com.irurueta.authserver.testsupport
package com.irurueta.authserver.testsupport
Shared test harness: Testcontainers PostgreSQL support for integration tests, and the comparison of the OpenAPI
contracts under
apis/ with the documents the applications serve.-
ClassDescriptionSupplies the inputs of the encryption of signing keys at rest to a test context.Runs the
keytoolof the JDK that runs the tests and cleans up the temporary directories its key stores live in; the JDK has no public API to issue a certificate.Describes the Mailpit container the one-time token tests read the e-mail of: the pinned image, its two ports and a factory that builds the container and the client of its HTTP API.Reads the messages a Mailpit server received through its HTTP API, so a test finds the code or the link the application mailed to a recipient.A message Mailpit received.Starts a Mailpit container for a Spring test context and points the application's mail sender at it, so the messages the application sends can be read back throughMailpitClient.Compares an OpenAPI contract underapis/with the OpenAPI document a running application serves.Meta-annotation for integration tests backed by a PostgreSQL Testcontainers container.Exposes a PostgreSQL Testcontainers container as a Spring Boot service connection, so theDataSource(and Flyway) of a test context is wired to it automatically.Generates self-signed client certificates at run time for the tests of the sign-in with a client certificate, so no certificate, key or key store is ever kept in the repository.A generated certificate.A small public key infrastructure generated at run time for the tests of TLS client authentication: a certificate authority, and server and client certificates it signs, each kept in a PKCS#12 key store inside one temporary directory thatTestPki.close()deletes.An identity of the infrastructure.