use of io.strimzi.test.k8s.KubeClusterResource in project strimzi by strimzi.
the class StrimziRunner method clusterResource.
/**
* Get the value of the @ClassRule-annotated KubeClusterResource field
*/
private KubeClusterResource clusterResource() {
if (clusterResource == null) {
List<KubeClusterResource> fieldValues = getTestClass().getAnnotatedFieldValues(null, ClassRule.class, KubeClusterResource.class);
if (fieldValues == null || fieldValues.isEmpty()) {
fieldValues = getTestClass().getAnnotatedMethodValues(null, ClassRule.class, KubeClusterResource.class);
}
if (fieldValues == null || fieldValues.isEmpty()) {
clusterResource = new KubeClusterResource();
clusterResource.before();
} else {
clusterResource = fieldValues.get(0);
}
}
return clusterResource;
}
Aggregations