Search in sources :

Example 11 with V1ObjectMeta

use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.

the class ServiceWatcherTest method whenServiceHasNoDomainUid_returnNull.

@Test
public void whenServiceHasNoDomainUid_returnNull() throws Exception {
    V1Service service = new V1Service().metadata(new V1ObjectMeta());
    assertThat(ServiceWatcher.getServiceDomainUID(service), nullValue());
}
Also used : V1ObjectMeta(io.kubernetes.client.models.V1ObjectMeta) V1Service(io.kubernetes.client.models.V1Service) Test(org.junit.Test)

Example 12 with V1ObjectMeta

use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.

the class ServiceWatcherTest method whenServiceHasServerName_returnIt.

@Test
public void whenServiceHasServerName_returnIt() throws Exception {
    V1Service service = new V1Service().metadata(new V1ObjectMeta().labels(ImmutableMap.of(SERVERNAME_LABEL, "myserver")));
    assertThat(ServiceWatcher.getServiceServerName(service), equalTo("myserver"));
}
Also used : V1ObjectMeta(io.kubernetes.client.models.V1ObjectMeta) V1Service(io.kubernetes.client.models.V1Service) Test(org.junit.Test)

Example 13 with V1ObjectMeta

use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.

the class ServiceWatcherTest method whenServiceHasDomainUid_returnIt.

@Test
public void whenServiceHasDomainUid_returnIt() throws Exception {
    V1Service service = new V1Service().metadata(new V1ObjectMeta().labels(ImmutableMap.of(DOMAINUID_LABEL, "domain1")));
    assertThat(ServiceWatcher.getServiceDomainUID(service), equalTo("domain1"));
}
Also used : V1ObjectMeta(io.kubernetes.client.models.V1ObjectMeta) V1Service(io.kubernetes.client.models.V1Service) Test(org.junit.Test)

Example 14 with V1ObjectMeta

use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.

the class ServiceWatcherTest method whenServiceHasNoServerName_returnNull.

@Test
public void whenServiceHasNoServerName_returnNull() throws Exception {
    V1Service service = new V1Service().metadata(new V1ObjectMeta());
    assertThat(ServiceWatcher.getServiceServerName(service), nullValue());
}
Also used : V1ObjectMeta(io.kubernetes.client.models.V1ObjectMeta) V1Service(io.kubernetes.client.models.V1Service) Test(org.junit.Test)

Example 15 with V1ObjectMeta

use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.

the class ServiceWatcherTest method whenServiceHasChannelName_returnIt.

@Test
public void whenServiceHasChannelName_returnIt() throws Exception {
    V1Service service = new V1Service().metadata(new V1ObjectMeta().labels(ImmutableMap.of(CHANNELNAME_LABEL, "channel1")));
    assertThat(ServiceWatcher.getServiceChannelName(service), equalTo("channel1"));
}
Also used : V1ObjectMeta(io.kubernetes.client.models.V1ObjectMeta) V1Service(io.kubernetes.client.models.V1Service) Test(org.junit.Test)

Aggregations

V1ObjectMeta (io.kubernetes.client.models.V1ObjectMeta)36 Test (org.junit.Test)12 V1Service (io.kubernetes.client.models.V1Service)10 ApiException (io.kubernetes.client.ApiException)7 CallBuilderFactory (oracle.kubernetes.operator.helpers.CallBuilderFactory)6 V1beta1Ingress (io.kubernetes.client.models.V1beta1Ingress)5 DomainPresenceInfo (oracle.kubernetes.operator.helpers.DomainPresenceInfo)4 IntOrString (io.kubernetes.client.custom.IntOrString)3 V1PodTemplateSpec (io.kubernetes.client.models.V1PodTemplateSpec)3 HashMap (java.util.HashMap)3 Domain (oracle.kubernetes.weblogic.domain.v1.Domain)3 DomainSpec (oracle.kubernetes.weblogic.domain.v1.DomainSpec)3 V1LabelSelector (io.kubernetes.client.models.V1LabelSelector)2 V1Namespace (io.kubernetes.client.models.V1Namespace)2 V1Secret (io.kubernetes.client.models.V1Secret)2 V1ServicePort (io.kubernetes.client.models.V1ServicePort)2 V1ServiceSpec (io.kubernetes.client.models.V1ServiceSpec)2 Method (java.lang.reflect.Method)2 ArrayList (java.util.ArrayList)2 ServerKubernetesObjects (oracle.kubernetes.operator.helpers.ServerKubernetesObjects)2