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());
}
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"));
}
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"));
}
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());
}
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"));
}
Aggregations