Class DockerCubeCustomizableURLResourceProvider
- All Implemented Interfaces:
org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider
URLResourceProvider is not
on
on the classpath, a way to inject the URL is required.
In this case the URL will be composed with next format:
scheme graphene configuration parameter [http, https, ...] or http if not set.
plus
url graphene configuration parameter. This can use the dockerHost special word which will be replaced at runtime by docker host ip. Also if url property starts with relative path, dockerHost resolution will be appended automatically at the start of the url.
If url is http://192.168.99.100/context the result will be http://192.168.99.100/context
If url is http://dockerHost/context then the result will be http://<ipOfDockerHost>/context
If url is http://<containerName>/context so NOT dockerHost and not an IP then the result will be http://<internalIpOfGivenContainer>/context
The next thing to resolve is the port of the URL.
If url has not port, then 80 port is used.
If url has a port (http://dockerHost:8080), Cube will use 8080 as exposed port.
For example url set to http://mycontainer/context, then the result will be http://<ipOfContainer>:8080/context
- See Also:
-
ResourceProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider
org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider.ClassInjection, org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider.MethodInjection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvide(Class<?> type) lookup(org.jboss.arquillian.test.api.ArquillianResource resource, Annotation... qualifiers)
-
Constructor Details
-
DockerCubeCustomizableURLResourceProvider
public DockerCubeCustomizableURLResourceProvider()
-
-
Method Details
-
canProvide
- Specified by:
canProvidein interfaceorg.jboss.arquillian.test.spi.enricher.resource.ResourceProvider
-
lookup
public Object lookup(org.jboss.arquillian.test.api.ArquillianResource resource, Annotation... qualifiers) - Specified by:
lookupin interfaceorg.jboss.arquillian.test.spi.enricher.resource.ResourceProvider
-