Search in sources :

Example 6 with EntandoApp

use of org.entando.kubernetes.model.app.EntandoApp in project entando-k8s-controller-coordinator by entando-k8s.

the class EntandoOperatorMatcherTest method testOperatorIdActiveAndMatching.

@Test
void testOperatorIdActiveAndMatching() {
    System.setProperty(ControllerCoordinatorProperty.ENTANDO_K8S_OPERATOR_ID.getJvmSystemProperty(), "myid");
    EntandoApp entandoApp = new EntandoApp();
    entandoApp.getMetadata().setAnnotations(Collections.singletonMap(AnnotationNames.OPERATOR_ID_ANNOTATION.getName(), "myid"));
    assertTrue(EntandoOperatorMatcher.matchesThisOperator(entandoApp));
}
Also used : EntandoApp(org.entando.kubernetes.model.app.EntandoApp) Test(org.junit.jupiter.api.Test)

Example 7 with EntandoApp

use of org.entando.kubernetes.model.app.EntandoApp in project entando-k8s-controller-coordinator by entando-k8s.

the class EntandoOperatorMatcherTest method testVersionRangeInactive.

@Test
void testVersionRangeInactive() {
    EntandoApp entandoApp = new EntandoApp();
    entandoApp.setApiVersion("entando.org/v1");
    assertTrue(EntandoOperatorMatcher.matchesThisOperator(entandoApp));
}
Also used : EntandoApp(org.entando.kubernetes.model.app.EntandoApp) Test(org.junit.jupiter.api.Test)

Aggregations

EntandoApp (org.entando.kubernetes.model.app.EntandoApp)7 Test (org.junit.jupiter.api.Test)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 YAMLFactory (com.fasterxml.jackson.dataformat.yaml.YAMLFactory)1 Service (io.fabric8.kubernetes.api.model.Service)1 Deployment (io.fabric8.kubernetes.api.model.apps.Deployment)1 Ingress (io.fabric8.kubernetes.api.model.extensions.Ingress)1 DefaultKubernetesClient (io.fabric8.kubernetes.client.DefaultKubernetesClient)1 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)1 Allure.attachment (io.qameta.allure.Allure.attachment)1 Allure.step (io.qameta.allure.Allure.step)1 Description (io.qameta.allure.Description)1 Feature (io.qameta.allure.Feature)1 Issue (io.qameta.allure.Issue)1 Arrays (java.util.Arrays)1 Optional (java.util.Optional)1 Optional.ofNullable (java.util.Optional.ofNullable)1 TimeUnit (java.util.concurrent.TimeUnit)1 AssertionsForClassTypes.assertThat (org.assertj.core.api.AssertionsForClassTypes.assertThat)1 Awaitility.await (org.awaitility.Awaitility.await)1