Class AbstractAwsTestResourceProvider<C extends org.testcontainers.containers.GenericContainer<? extends C>, S extends AwsEmulatorService<C>>
java.lang.Object
io.micronaut.testresources.testcontainers.AbstractTestContainersProvider<C>
io.micronaut.testresources.aws.AbstractAwsTestResourceProvider<C,S>
- Type Parameters:
C- the container typeS- the service type
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, TestResourcesResolver, ToggableTestResourcesResolver
- Direct Known Subclasses:
FlociTestResourceProvider, LocalStackTestResourceProvider
@Internal
public abstract class AbstractAwsTestResourceProvider<C extends org.testcontainers.containers.GenericContainer<? extends C>, S extends AwsEmulatorService<C>>
extends AbstractTestContainersProvider<C>
Base provider for AWS emulator test resources.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractTestContainersProvider
AbstractTestContainersProvider.ContainerCommand -
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface TestResourcesResolver
TEST_RESOURCES_PROPERTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAwsTestResourceProvider(Class<S> serviceType) protectedAbstractAwsTestResourceProvider(Class<S> serviceType, Collection<S> additionalServices) -
Method Summary
Modifier and TypeMethodDescriptiongetResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Returns the list of properties that this resolver is able to support.protected abstract StringresolveAccessKey(C container) resolveProperty(String propertyName, C container) protected abstract StringresolveRegion(C container) protected abstract StringresolveSecretKey(C container) protected booleanshouldAnswer(String propertyName, Map<String, Object> requestedProperties, Map<String, Object> testResourcesConfig) Determines if this resolver can resolve the requested property.Methods inherited from class AbstractTestContainersProvider
configureContainer, createContainer, executeInContainer, getContainerOwnerKey, getContainerQuery, getDefaultImageName, getDefaultStartupTimeout, getName, getOrder, getSimpleName, prepareContainer, resolve, resolveProperty, resolveWithoutContainer, stringOrNullMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TestResourcesResolver
getId, getRequiredProperties, getRequiredPropertyEntriesMethods inherited from interface ToggableTestResourcesResolver
getDisplayName, isEnabled
-
Constructor Details
-
AbstractAwsTestResourceProvider
-
AbstractAwsTestResourceProvider
-
-
Method Details
-
getResolvableProperties
public List<String> getResolvableProperties(Map<String, Collection<String>> propertyEntries, Map<String, Object> testResourcesConfig) Description copied from interface:TestResourcesResolverReturns the list of properties that this resolver is able to support. The property entries map is a map which keys are the property entries retrieved from callingTestResourcesResolver.getRequiredPropertyEntries()and values are those property entries resolved.- Parameters:
propertyEntries- the property entriestestResourcesConfig- the test resources configuration- Returns:
- the list of properties
-
shouldAnswer
protected boolean shouldAnswer(String propertyName, Map<String, Object> requestedProperties, Map<String, Object> testResourcesConfig) Description copied from class:AbstractTestContainersProviderDetermines if this resolver can resolve the requested property. It is used in order to make sure that a "Postgres" resolver wouldn't provide a value if the requested container type is for MySQL, for example.- Overrides:
shouldAnswerin classAbstractTestContainersProvider<C extends org.testcontainers.containers.GenericContainer<? extends C>>- Parameters:
propertyName- the property to resolverequestedProperties- the resolved propertiestestResourcesConfig- the test resources configuration- Returns:
- if this resolver should answer
-
resolveProperty
- Specified by:
resolvePropertyin classAbstractTestContainersProvider<C extends org.testcontainers.containers.GenericContainer<? extends C>>
-
getServices
-
getServiceKinds
-
resolveAccessKey
-
resolveSecretKey
-
resolveRegion
-