@Documented @Retention(value=RUNTIME) @Target(value={ANNOTATION_TYPE,TYPE}) @Repeatable(value=VirtualResources.class) public @interface VirtualResource
| Modifier and Type | Required Element and Description |
|---|---|
String |
value
The name of the virtual resource.
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
await
A flag that indicate whether to wait for all virtual resource ports to be reachable.
|
String |
cmd
The command used to execute the virtual resource.
|
String |
configKey
The configuration section key in .testify.yml associated with the virtual
resource.
|
String[] |
dataFiles
A list of classpath data files that should be loaded by the virtual resource prior to
being used.
|
Class<? extends DataProvider> |
dataProvider
Specifies a data provider implementations that loads data into the resource prior to it
being used.
|
long |
delay
The amount of time to wait between port reachability retries.
|
String[] |
env
A list of environmental variables.
|
boolean |
link
A flag that indicates whether to link the
virtual resource nodes. |
long |
maxDelay
Max delay for exponentially backoff between port reachability retries.
|
long |
maxDuration
Maximum retry duration before giving up waiting for ports to be reachable.
|
int |
maxRetries
Maximum number of retries before giving up waiting for ports to be reachable.
|
String |
name
The virtual resource instance name.
|
int |
nodes
The number of virtual resource nodes to start.
|
int[] |
ports
A list of ports exposed by the virtual resource that we should wait for to be reachable.
|
Class<? extends VirtualResourceProvider> |
provider
Specifies the virtual resource provider implementation class to use.
|
boolean |
pull
Auto pull the image from the virtual resource a registry.
|
Class |
resourceContract
Specifies the virtual resource's contract.
|
String |
resourceName
Specifies the virtual resource's name.
|
long |
timeout
Maximum duration to wait for an image to be pulled before giving up entirely.
|
TimeUnit |
unit
Time unit for delay, max delay, and duration.
|
String |
version
The version of the virtual resource.
|
public abstract String value
public abstract String version
public abstract String cmd
public abstract boolean pull
public abstract String name
The virtual resource instance name. This useful for giving the virtual resource instance a unique name to distinguish it from other virtual resource instances.
By default if the name is not specified the image name will be used as
the name of the virtual instance.
public abstract String configKey
public abstract String[] dataFiles
FileSystem.getPathMatcher(java.lang.String)
glob patterns are supportedpublic abstract Class<? extends DataProvider> dataProvider
public abstract String resourceName
Specifies the virtual resource's name. This useful for giving the resource instance a unique name that can be used to qualify and distinguish it from other similar resources.
Note that if the name is not specified the name provided by the virtual resource provider implementation will be used.
public abstract Class resourceContract
Specifies the virtual resource's contract. This useful for getting the virtual resource by its contract.
Note that if the contract is not specified the resource instance will be injectable by its implementation class only.
public abstract int nodes
public abstract boolean link
virtual resource nodes.public abstract String[] env
public abstract boolean await
public abstract int[] ports
public abstract long delay
unit().public abstract long maxDelay
unit().public abstract int maxRetries
public abstract long maxDuration
unit().public abstract long timeout
unit().public abstract TimeUnit unit
public abstract Class<? extends VirtualResourceProvider> provider
Copyright © 2016–2018 Testify Project. All rights reserved.