Package com.openshift.client

Examples of com.openshift.client.IDomain


  }

  @Test
  public void shouldReportCanCreateAppWithEnvVars() throws Throwable {
    // pre-conditions
    IDomain domain = user.getDomain("foogoo");
    assertThat(domain).isNotNull();
   
    // operation
    boolean canCreateWithEnvVars = domain.canCreateApplicationWithEnvironmentVariables();

    // verifications
    assertThat(canCreateWithEnvVars).isTrue();
  }
View Full Code Here


  public void shouldEqualDomainFromOtherUser() throws Throwable {
    // pre-conditions
    IUser user = new TestConnectionBuilder().defaultCredentials().create(clientMock).getUser();

    // operation
    final IDomain domain = user.getDomain("foobarz");

    // verifications
    assertThat(domain).isEqualTo(this.domain);
    assertTrue(domain != this.domain); // not same objects
  }
View Full Code Here

    SSHKeyTestUtils.addTestKeyToOpenShift(user);
  }

  @Before
  public void setUp() throws Exception {
    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    this.application = ApplicationTestUtils.getOrCreateApplication(domain);
    this.session = createSSHSession(application.getSshUrl());
  }
View Full Code Here

        .mockGetDomains(GET_DOMAINS)
        .mockGetApplications(
            "foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_3EMBEDDED)
        .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(httpClient).getUser();
    IDomain domain = user.getDomain("foobarz");
    IApplication application = domain.getApplicationByName("springeap6");

    IDeployedStandaloneCartridge cartridge = application.getCartridge();

    cartridge.setAdditionalGearStorage(40);
View Full Code Here

    // pre-conditions
    mockDirector
        .mockGetApplications("foobarz",
            Samples.GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP_SCALABLE_DOWNLOADABLECART);

    IDomain domain = mockDirector.getDomain("foobarz");
    IApplication application = domain.getApplicationByName("downloadablecart");
    assertThat(application).isNotNull();

    IEmbeddableCartridge foreman = new EmbeddableCartridge(null, new URL(FOREMAN_URL));
    new CartridgeAssert<IEmbeddableCartridge>(foreman)
        .hasUrl(CartridgeTestUtils.FOREMAN_URL)
View Full Code Here

 
  @Test
  public void shouldEqualApplication() throws Throwable {
    // precondition
    // operation
    IDomain domain = mockDirector.getDomain("foobarz");
    // verifications
    assertThat(domain).isEqualTo(this.domain);
    assertTrue(domain != this.domain);
  }
View Full Code Here

  }

  @Test
  public void shouldShowDomain() throws Exception {
    // pre-condition
    IDomain domain = DomainTestUtils.ensureHasDomain(connection.getUser());
    assertThat(domain).isNotNull();
    String domainId = domain.getId();
    assertThat(domainId).isNotEmpty();
    IOpenShiftConnection connection = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create();
    APIResource api = ((APIResource) connection);
   
    // operation
    IDomain retrievedDomain = api.showDomain(domainId);
   
    // verification
    new DomainAssert(retrievedDomain).hasId(domainId);
  }
View Full Code Here

  }

  @Test
  public void shouldSetNamespace() throws Exception {
    // pre-condition
    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    String namespace = DomainTestUtils.createRandomName();
    // cannot set namespace if there are applications
    ApplicationTestUtils.destroyAllApplications(domain);
   
    // operation
    domain.rename(namespace);

    // verification
    IDomain domainByNamespace = user.getDomain(namespace);
    assertThat(domainByNamespace.getId()).isEqualTo(namespace);
  }
View Full Code Here

  }

  @Test
  public void shouldDeleteDomainWithoutApplications() throws Exception {
    // pre-condition
    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    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

    assertThat(domainByNamespace).isNull();
  }

  @Test
  public void shouldNotDeleteDomainWithApplications() throws OpenShiftException {
    IDomain domain = null;
    try {
      // pre-condition
      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

TOP

Related Classes of com.openshift.client.IDomain

Copyright © 2018 www.massapicom. 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.