Search in sources :

Example 1 with Resources

use of io.strimzi.test.Resources in project strimzi by strimzi.

the class ConnectClusterTest method testDeployConnectClusterViaTemplate.

@Test
@Resources(value = "../examples/templates/cluster-controller", asAdmin = true)
@OpenShiftOnly
public void testDeployConnectClusterViaTemplate() {
    Oc oc = (Oc) this.kubeClient;
    String clusterName = "openshift-my-connect-cluster";
    oc.newApp("strimzi-connect", map("CLUSTER_NAME", clusterName, "KAFKA_CONNECT_BOOTSTRAP_SERVERS", BOOTSTRAP_SERVERS));
    String deploymentName = clusterName + "-connect";
    oc.waitForDeployment(deploymentName);
    oc.deleteByName("cm", clusterName);
    oc.waitForResourceDeletion("deployment", deploymentName);
}
Also used : Oc(io.strimzi.test.k8s.Oc) Test(org.junit.Test) Resources(io.strimzi.test.Resources) OpenShiftOnly(io.strimzi.test.OpenShiftOnly)

Example 2 with Resources

use of io.strimzi.test.Resources in project strimzi by strimzi.

the class KafkaClusterTest method testDeployKafkaClusterViaTemplate.

@Test
@Resources(value = "../examples/templates/cluster-controller", asAdmin = true)
@OpenShiftOnly
public void testDeployKafkaClusterViaTemplate() {
    Oc oc = (Oc) this.kubeClient;
    String clusterName = "openshift-my-cluster";
    oc.newApp("strimzi-ephemeral", map("CLUSTER_NAME", clusterName));
    oc.waitForStatefulSet(zookeeperStatefulSetName(clusterName), 1);
    oc.waitForStatefulSet(kafkaStatefulSetName(clusterName), 3);
    oc.deleteByName("cm", clusterName);
    oc.waitForResourceDeletion("statefulset", kafkaStatefulSetName(clusterName));
    oc.waitForResourceDeletion("statefulset", zookeeperStatefulSetName(clusterName));
}
Also used : Oc(io.strimzi.test.k8s.Oc) Test(org.junit.Test) Resources(io.strimzi.test.Resources) OpenShiftOnly(io.strimzi.test.OpenShiftOnly)

Aggregations

OpenShiftOnly (io.strimzi.test.OpenShiftOnly)2 Resources (io.strimzi.test.Resources)2 Oc (io.strimzi.test.k8s.Oc)2 Test (org.junit.Test)2