Arquillian Cube Extension 1.10.0 Released
Since we wrote this post we didn't laze around. Check our latest announcement.
The Arquillian team is proud to announce the 1.10.0 release of the Arquillian Cube Extension component!
We are deligthed to announce a new version of Arquillian Cube 1.10.0 with new features and bug fixes.
In this new version of Arquillian Cube there has been major improvements in OpenShift:“https://www.openshift.com/” integration.
What’s new
[OpenShift] Add support for role binding and add roles to service accounts
If you are using OpenShift:“https://www.openshift.com/” you can use @AddRoleToServiceAccount
and @RoleBinding
annotations to bind roles for a test.
[OpenShift] Add support for setting templates with annotation
If you are using OpenShift:“https://www.openshift.com/”, you can set OpenShift templates location using an annotation (@Template
) instead of a configuration parameter.
@Template(url = "https://gist.githubusercontent.com/lordofthejars/8781cacd4000a516695ad6c55b5815b3/raw/5151aeef0f5dd8823e2c581c3b7452f04a76af59/hello-template.yaml",
parameters = @TemplateParameter(name = "RESPONSE", value = "Hello from Arquillian Template"))
public class HelloWorldTemplateTest {}
@Template
accepts only any location in URL
form. It is important to note that URL
can contain references to system properties or environment variables by using ${systemproperty}
in case of a system property or ${env.environmentvariable}
in case of an environment variable.
You can add :
after attribute name to provide a default value.
You can see full example at template project
[OpenShift] Add support for creating OpenShift Resources with annotation
If you are using OpenShift:“https://www.openshift.com/”, you can set any OpenShift resource to be executed either before test class or before test method. Notice that after test class/test method execution these resources are going to be deleted.
To set OpenShift resources you need to use @OpenShiftResource
at class or method level.
@OpenShiftResource("classpath:hello-route.yaml")
public class HelloWorldOpenShiftResourcesTest {}
@OpenShiftResource
value attribute can either be:
- a link (https://www.github.com/alesj/template-testing/some.json)
- a test classpath resource (
classpath:some.json
) - or plain content (
{"kind" : "Secret", ...}
)
You can see full example at openshift resources project
[Docker/Kubernetes/OpenShift] Provides abstraction for executing CLI operations
You can instantiate CommandExecutor
class to execute CLI operations directly from your test.
Usually, you use this class to execute commands directly from kubectl
or oc
tool.
private static CommandExecutor commandExecutor = new CommandExecutor();
final List<String> namespaces = commandExecutor.execCommand("kubectl get ns -o=name");
You can see full example at command executor project
[OpenShift] Provides a way to skip readiness await
Able to turn off readiness await to workaround Fabric8 Kubernetes Client issues such as https://github.com/fabric8io/kubernetes-client/issues/921
By default readiness await is always performed, but you can skip it by setting configuration parameter wait.enabled
to false in arquillian.xml
.
[Kubernetes/OpenShift] Namespace in annotation name
Now you can enrich a test with an element of another namespace different fromfa
the current one.
@ArquillianResource
@Named(value = "my-service", namespace = "my-predefined-namespace")
Service service;
[OpenShift] Provides an OpenShift assistant to deploy resources programmatically
Sometimes you need to decide when and what to deploy in OpenShift:“https://www.openshift.com/” cluster. Maybe you want to deploy something in one specific part of the test method and delete it in another part. For this reason a test can be enriched with OpenShiftAssistant
to execute operations in current OpenShift cluster namespace in any part of the test.
@ArquillianResource OpenShiftAssistant openShiftAssistant;
openShiftAssistant.deployApplication("hello-world", "hello-route.json");
final Optional<URL> route = openShiftAssistant.getRoute(); openShiftAssistant.awaitUrl(route.get());
You can see full example at OpenShift assistant project
What is Arquillian Cube Extension?
With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.
Release details
Component | Arquillian Cube Extension |
---|---|
Version | 1.10.0 view tag |
Release date | 2017-12-08 |
Released by | Alien Ike |
Compiled against |
Published artifacts org.arquillian.cube
- org.arquillian.cube » arquillian-cube-api jar javadoc pom
- org.arquillian.cube » arquillian-cube-spi jar javadoc pom
- org.arquillian.cube » arquillian-cube-core jar javadoc pom
- org.arquillian.cube » arquillian-cube-containerless jar javadoc pom
- org.arquillian.cube » assertj-docker-java jar javadoc pom
- org.arquillian.cube » arquillian-cube-docker jar javadoc pom
- org.arquillian.cube » arquillian-cube-docker-drone jar javadoc pom
- org.arquillian.cube » arquillian-cube-docker-reporter jar javadoc pom
- org.arquillian.cube » arquillian-cube-docker-restassured jar javadoc pom
- org.arquillian.cube » arquillian-cube-docker-junit-rule jar javadoc pom
- org.arquillian.cube » arquillian-cube-openshift-api jar javadoc pom
- org.arquillian.cube » arquillian-cube-openshift-shrinkwrap jar javadoc pom
- org.arquillian.cube » arquillian-cube-openshift jar javadoc pom
- org.arquillian.cube » arquillian-cube-kubernetes-fabric8 jar javadoc pom
- org.arquillian.cube » arquillian-cube-kubernetes jar javadoc pom
- org.arquillian.cube » arquillian-cube-kubernetes-reporter jar javadoc pom
- org.arquillian.cube » arquillian-cube-requirement jar javadoc pom
- org.arquillian.cube » arquillian-cube-bom pom
Release notes and resolved issues 27
- Other
-
- #892 Namespace in annotation named
- #867 provide an option to skip readiness await
- #826 Openshift: missing pieces from CE-Arq: @RunInPodDeployment
- #825 Openshift: missing pieces from CE-Arq: @RunInPod
- #823 Openshift: missing pieces from CE-Arq: @Replicas
- #821 Openshift: missing pieces from CE-Arq: @ExternalDeployment
- #820 Openshift: missing pieces from CE-Arq: @AddRoleToServiceAccount
- #814 Openshift: other goodies from CE-Arq
- Enhancement
-
- #889 Integrate OpenShiftTestAssistant to deploy resources programmatically
- #864 Inject ConfigurationHandle object
- #860 Set @OpenShiftResources at method level
- #851 Use `@Repeatable` annotations in OpenShift annotations
- #850 @OpenShiftResources only support json format
- #468 Openshift: Support the creation of generic resources from a file
- #467 Openshift: Instantiate templates
- Openshift
- Train/ginger
-
- #882 Enhancement Improve Cube CI to run all ftests from k8s & openshift
- #880 Allow all test docker images to run on minishift
- #876 Cube should wait for openshift by default to initialize environment
- #869 ResourceProvider of type Url couldn't lookup for KuberntesServiceUrlResourceProvider if classpathcontains multiple resourceProviders of url type
- #835 ConfigMap booster - RoleBinding is not created properly before the tests execution
- #830 Provide a ‘oc’ command proxy
- #824 Openshift: missing pieces from CE-Arq: @RoleBinding
- #822 Openshift: missing pieces from CE-Arq: @MountSecret
Thanks to the following list of contributors: Alex Soto, Dipak Pawar, Jonh Wendell, Bartosz Majsak, Strowk, Ladislav Thon, Hemani, Georg Wolf, Arquillian