Search in sources :

Example 16 with Domain

use of com.microsoft.applicationinsights.smoketest.schemav2.Domain in project weblogic-kubernetes-operator by oracle.

the class PodHelperConfigTest method getActualAdminServerPodConfigForServerStartupAndDefaults.

private V1Pod getActualAdminServerPodConfigForServerStartupAndDefaults() throws Exception {
    // default image & default image pull policy
    Domain domain = getDomainCustomResourceForDefaults(null, null);
    domain.getSpec().withServerStartup(newTestServersStartupList());
    // no pvc
    return getActualAdminServerPodConfig(domain, newPersistentVolumeClaimList());
}
Also used : Domain(oracle.kubernetes.weblogic.domain.v1.Domain)

Example 17 with Domain

use of com.microsoft.applicationinsights.smoketest.schemav2.Domain in project weblogic-kubernetes-operator by oracle.

the class PodHelperConfigTest method getDomainCustomResourceForDefaults.

private Domain getDomainCustomResourceForDefaults(String image, String imagePullPolicy) {
    DomainSpec spec = newDomainSpec();
    spec.setDomainUID(DOMAIN_UID);
    spec.setDomainName(DOMAIN_NAME);
    spec.setAsName(ADMIN_SERVER_NAME);
    spec.setAdminSecret(newSecretReference().name(WEBLOGIC_CREDENTIALS_SECRET_NAME));
    spec.setAsPort(ADMIN_SERVER_PORT);
    if (image != null) {
        spec.setImage(image);
    }
    if (imagePullPolicy != null) {
        spec.setImagePullPolicy(imagePullPolicy);
    }
    Domain domain = new Domain();
    domain.setMetadata(newObjectMeta().namespace(NAMESPACE));
    domain.setSpec(spec);
    return domain;
}
Also used : DomainSpec(oracle.kubernetes.weblogic.domain.v1.DomainSpec) Domain(oracle.kubernetes.weblogic.domain.v1.Domain)

Example 18 with Domain

use of com.microsoft.applicationinsights.smoketest.schemav2.Domain in project weblogic-kubernetes-operator by oracle.

the class WatchBuilderTest method whenDomainWatchReceivesModifyAndDeleteResponses_returnBothFromIterator.

@SuppressWarnings("unchecked")
@Test
public void whenDomainWatchReceivesModifyAndDeleteResponses_returnBothFromIterator() throws Exception {
    Domain domain1 = new Domain().withApiVersion(API_VERSION).withKind("Domain").withMetadata(createMetaData("domain1", NAMESPACE));
    Domain domain2 = new Domain().withApiVersion(API_VERSION).withKind("Domain").withMetadata(createMetaData("domain2", NAMESPACE));
    defineHttpResponse(DOMAIN_RESOURCE, withResponses(createModifiedResponse(domain1), createDeletedResponse(domain2)));
    WatchI<Domain> domainWatch = new WatchBuilder().createDomainWatch(NAMESPACE);
    assertThat(domainWatch, contains(modifyEvent(domain1), deleteEvent(domain2)));
}
Also used : Domain(oracle.kubernetes.weblogic.domain.v1.Domain) HttpUserAgentTest(com.meterware.pseudoserver.HttpUserAgentTest) Test(org.junit.Test)

Example 19 with Domain

use of com.microsoft.applicationinsights.smoketest.schemav2.Domain in project weblogic-kubernetes-operator by oracle.

the class CreateDomainGeneratedFilesOptionalFeaturesEnabledTest method getExpectedDomain.

@Override
protected Domain getExpectedDomain() {
    Domain expected = super.getExpectedDomain();
    expected.getSpec().withExportT3Channels(newStringList().addElement("T3Channel"));
    // there is only one server startup item in the base domain config - set its node port:
    expected.getSpec().getServerStartup().get(0).withNodePort(Integer.parseInt(getInputs().getAdminNodePort()));
    return expected;
}
Also used : Domain(oracle.kubernetes.weblogic.domain.v1.Domain)

Example 20 with Domain

use of com.microsoft.applicationinsights.smoketest.schemav2.Domain in project openstack4j by ContainX.

the class KeystoneDomainServiceTests method crud_domain_test.

// ------------ Domain Tests ------------
// Tests here just address the missing update() spec feature.
// Find more tests in the respective KeystoneXService.spec in
// core-integration-test module
public void crud_domain_test() throws Exception {
    // create a new domain
    Domain domain = Builders.domain().name(DOMAIN_NAME).description(DOMAIN_DESCRIPTION).enabled(true).build();
    respondWith(JSON_DOMAINS_CREATE);
    Domain newDomain = osv3().identity().domains().create(domain);
    assertEquals(newDomain.getName(), DOMAIN_NAME);
    assertEquals(newDomain.getDescription(), DOMAIN_DESCRIPTION);
    String DOMAIN_ID = newDomain.getId();
    // update an existing domain
    respondWith(JSON_DOMAINS_UPDATE);
    Domain updatedDomain = osv3().identity().domains().update(Builders.domain().id(DOMAIN_ID).description(DOMAIN_DESCRIPTION_UPDATED).enabled(true).build());
    assertEquals(updatedDomain.getId(), DOMAIN_ID);
    assertEquals(updatedDomain.getName(), DOMAIN_NAME);
    assertEquals(updatedDomain.getDescription(), DOMAIN_DESCRIPTION_UPDATED);
}
Also used : Domain(org.openstack4j.model.identity.v3.Domain)

Aggregations

Domain (oracle.kubernetes.weblogic.domain.v1.Domain)33 Type (java.lang.reflect.Type)14 Domain (org.openstack4j.model.identity.v3.Domain)10 ProgressRequestBody (io.kubernetes.client.ProgressRequestBody)7 ProgressResponseBody (io.kubernetes.client.ProgressResponseBody)7 DomainSpec (oracle.kubernetes.weblogic.domain.v1.DomainSpec)7 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)5 V1ObjectMeta (io.kubernetes.client.models.V1ObjectMeta)4 Map (java.util.Map)4 ApiException (io.kubernetes.client.ApiException)3 V1Service (io.kubernetes.client.models.V1Service)3 HashMap (java.util.HashMap)3 CallBuilderFactory (oracle.kubernetes.operator.helpers.CallBuilderFactory)3 Packet (oracle.kubernetes.operator.work.Packet)3 HttpUserAgentTest (com.meterware.pseudoserver.HttpUserAgentTest)2 Data (com.microsoft.applicationinsights.smoketest.schemav2.Data)2 Envelope (com.microsoft.applicationinsights.smoketest.schemav2.Envelope)2 MessageData (com.microsoft.applicationinsights.smoketest.schemav2.MessageData)2 V1ConfigMap (io.kubernetes.client.models.V1ConfigMap)2