Package com.openshift.client

Examples of com.openshift.client.IDomain.destroy()


                  DELETE_DOMAINS_FOOBARZ_KO_EXISTINGAPPS.getContentAsString(),
                  new IOException(
                      "IOException message: Server returned HTTP response code: 400 for URL: https://openshift.redhat.com/broker/rest/domains/foobarz")));
      IDomain domain = user.getDefaultDomain();
      // operation
      domain.destroy();
      // verification
      fail("exception expected");
    } catch (OpenShiftEndpointException e) {
      // verification
      assertThat(e.getRestResponse()).isNotNull();
View Full Code Here


  public void shouldDestroyDomain() throws Throwable {
    // pre-conditions
    mockDirector.mockDeleteDomain("foobarz", DELETE_DOMAINS_FOOBARZ);
    // operation
    final IDomain domain = user.getDomain("foobarz");
    domain.destroy();
    // verifications
    assertThat(user.getDomain("foobarz")).isNull();
    // 2 domains, 1 destroyed
    assertThat(user.getDomains()).hasSize(1);
  }
View Full Code Here

    mockDirector.mockDeleteDomain("foobarz",
        new BadRequestException("Domain contains applications. Delete applications first or set force to true.", null));
    // operation
    final IDomain domain = user.getDomain("foobarz");
    try {
      domain.destroy();
      fail("Expected an exception here..");
    } catch (OpenShiftEndpointException e) {
      assertThat(e.getCause()).isInstanceOf(BadRequestException.class);
    }
    // verifications
View Full Code Here

    String id = domain.getId();
    ApplicationTestUtils.destroyAllApplications(domain);
    assertThat(domain.getApplications()).isEmpty();
   
    // operation
    domain.destroy();

    // verification
    IDomain domainByNamespace = user.getDomain(id);
    assertThat(domainByNamespace).isNull();
  }
View Full Code Here

      domain = DomainTestUtils.ensureHasDomain(user);
      ApplicationTestUtils.getOrCreateApplication(domain);
      assertThat(domain.getApplications()).isNotEmpty();
     
      // operation
      domain.destroy();
      // verification
      fail("OpenShiftEndpointException did not occurr");
    } catch (OpenShiftEndpointException e) {
      // verification
    }
View Full Code Here

      domain = DomainTestUtils.ensureHasDomain(user);
      ApplicationTestUtils.getOrCreateApplication(domain);
      assertThat(domain.getApplications()).isNotEmpty();
     
      // operation
      domain.destroy();
      fail("OpenShiftEndpointException did not occurr");
    } catch (OpenShiftEndpointException e) {
      // verification
      assertThat(e.getRestResponseMessages().size()).isEqualTo(1);
      List<Message> messages = e.getRestResponseMessage(IField.DEFAULT);
View Full Code Here

    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    ApplicationTestUtils.getOrCreateApplication(domain);
    assertThat(domain.getApplications()).isNotEmpty();
   
    // operation
    domain.destroy(true);

    // verification
    assertThat(domain).isNotIn(user.getDomains());
    domain = null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.