public class DockerCubeCustomizableURLResourceProvider extends Object implements org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider
org.jboss.arquillian.container.test.impl.enricher.resource.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
ResourceProvider| Constructor and Description |
|---|
DockerCubeCustomizableURLResourceProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProvide(Class<?> type) |
Object |
lookup(org.jboss.arquillian.test.api.ArquillianResource resource,
Annotation... qualifiers) |
public DockerCubeCustomizableURLResourceProvider()
public boolean canProvide(Class<?> type)
canProvide in interface org.jboss.arquillian.test.spi.enricher.resource.ResourceProviderpublic Object lookup(org.jboss.arquillian.test.api.ArquillianResource resource, Annotation... qualifiers)
lookup in interface org.jboss.arquillian.test.spi.enricher.resource.ResourceProviderCopyright © 2018 JBoss by Red Hat. All rights reserved.