Package com.openshift.client

Examples of com.openshift.client.IApplication


  }

  @Test
  public void shouldGetEnvironmentProperties() throws Throwable {
    // pre-conditions
    final IApplication app = domain.getApplicationByName("springeap6");
    assertThat(app).isNotNull().isInstanceOf(ApplicationResource.class);
    String environmentProperties =
        "OPENSHIFT_TMP_DIR=/tmp/\n" +
            "HOSTNAME=ex-std-node360.prod.rhcloud.com\n" +
            "BASH=/bin/bash\n" +
View Full Code Here


  }

  @Test
  public void shouldGetGearGroups() throws Throwable {
    // pre-conditions
    final IApplication app = domain.getApplicationByName("springeap6");
    // operation
    final Collection<IGearGroup> gearGroups = app.getGearGroups();
    // verifications
    assertThat(new GearGroupsAssert(gearGroups)).hasSize(2);
    assertThat(new GearGroupsAssert(gearGroups)).assertGroup("514207b84382ec1fef0000ab")
        .hasUUID("514207b84382ec1fef0000ab")
        .hasAdditionalStorageSize(8)
View Full Code Here

  }

  @Test
  public void shouldReturnEmbeddedCartridgesForApplication() throws SocketTimeoutException, OpenShiftException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);

    // operation
    List<IEmbeddedCartridge> embeddedCartridges = application.getEmbeddedCartridges();
    // verification
    assertThat(embeddedCartridges).isNotNull();
  }
View Full Code Here

  @Test
  public void shouldNotContainTypeInEmbeddedCartridges() throws SocketTimeoutException, OpenShiftException {
    // pre-conditions
    final IStandaloneCartridge php = LatestVersionOf.php().get(user);
    assertThat(php).isNotNull();
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(php, domain);

    // operation
    List<IEmbeddedCartridge> embeddedCartridges = application.getEmbeddedCartridges();
    // verification
    assertThat(embeddedCartridges).doesNotSatisfy(new Condition<List<?>>() {
     
      @Override
      public boolean matches(List<?> values) {
View Full Code Here

  }

  @Test
  public void shouldEmbedMySQL() throws SocketTimeoutException, OpenShiftException, URISyntaxException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(application);
    IEmbeddableCartridge mysql = LatestVersionOf.mySQL().get(user);
    assertThat(mysql).isNotNull();
    assertThat(new ApplicationAssert(application)).hasNotEmbeddableCartridge(mysql);
    int numOfEmbeddedCartridges = application.getEmbeddedCartridges().size();

    // operation
    application.addEmbeddableCartridge(mysql);

    // verification
    assertThat(new ApplicationAssert(application))
        .hasEmbeddableCartridges(numOfEmbeddedCartridges + 1)
        .hasEmbeddedCartridge(LatestVersionOf.mySQL());
View Full Code Here

   */
  @Test
  public void shouldHaveUrlInEmbeddedMySQL() throws OpenShiftException, URISyntaxException, FileNotFoundException,
      IOException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(LatestVersionOf.mySQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    assertThat(new ApplicationAssert(user2Application))
        .hasEmbeddedCartridge(LatestVersionOf.mySQL());

    // operation

    // verification
    IEmbeddableCartridge mysql =
        LatestVersionOf.mySQL().get(user2);
    assertThat(mysql).isNotNull();   
    new EmbeddedCartridgeAssert(user2Application.getEmbeddedCartridge(mysql))
        .hasUrlProperty();
  }
View Full Code Here

   */
  @Test
  public void shouldHaveDescriptionAndDisplayNameInEmbeddedMySQL() throws OpenShiftException, URISyntaxException, FileNotFoundException,
      IOException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(LatestVersionOf.mySQL(), application);
    // verify using user instance that's not the one used to create

    // operation
    IEmbeddedCartridge mysql = application.getEmbeddedCartridge(LatestVersionOf.mySQL().get(user));
   
    // verification
    new EmbeddedCartridgeAssert(mysql)
        .hasDescription()
        .hasDisplayName();
View Full Code Here

  }

  @Test
  public void shouldReturnThatHasMySQL() throws OpenShiftException, FileNotFoundException, IOException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.mySQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.mySQL(), user2Application);

    // operation
View Full Code Here

  }

  @Test
  public void shouldEmbedPostgreSQL() throws SocketTimeoutException, OpenShiftException, URISyntaxException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(application);
    IEmbeddableCartridge postgres = LatestVersionOf.postgreSQL().get(user);
    assertThat(new ApplicationAssert(application))
      .hasNotEmbeddableCartridge(postgres);

    // operation
    application.addEmbeddableCartridge(postgres);

    // verification
    assertThat(new ApplicationAssert(application))
        .hasEmbeddedCartridge(LatestVersionOf.postgreSQL());
    new EmbeddedCartridgeAssert(application.getEmbeddedCartridge(postgres))
        .hasUrlProperty();
  }
View Full Code Here

  @Test
  public void shouldHaveUrlInEmbeddedPostgres() throws OpenShiftException, URISyntaxException, FileNotFoundException,
      IOException {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.ensureHasEmbeddedCartridges(
        LatestVersionOf.postgreSQL(), application);
    // verify using user instance that's not the one used to create
    IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    IApplication user2Application = user2.getDefaultDomain().getApplicationByName(application.getName());
    assertThat(new ApplicationAssert(user2Application)).hasEmbeddedCartridge(
        LatestVersionOf.postgreSQL());

    // operation

    // verification
    IEmbeddableCartridge postgres2 = LatestVersionOf.postgreSQL().get(user2);
    new EmbeddedCartridgeAssert(user2Application.getEmbeddedCartridge(postgres2))
        .hasUrlProperty();
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.IApplication

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.