Package com.openshift.client.utils

Examples of com.openshift.client.utils.ApplicationAssert


    // 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


    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
View Full Code Here

        LatestVersionOf.mySQL(), user2Application);

    // operation

    // verification
    assertThat(new ApplicationAssert(user2Application))
        .hasEmbeddedCartridge(LatestVersionOf.mySQL());
  }
View Full Code Here

  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

    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
View Full Code Here

  public void shouldEmbedMongo() throws Exception {
    // pre-conditions
    IApplication application = ApplicationTestUtils.ensureHasExactly1Application(domain);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(application);
    IEmbeddableCartridge mongo = LatestVersionOf.mongoDB().get(user);
    assertThat(new ApplicationAssert(application))
      .hasNotEmbeddableCartridge(mongo);

    // operation
    application.addEmbeddableCartridge(LatestVersionOf.mongoDB().get(user));

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

    // have to make sure have non-scalable app without cartridges
    IApplication jbossAs = ApplicationTestUtils.getOrCreateApplication(domain);
    jbossAs = ApplicationTestUtils.destroyAndRecreateIfScalable(jbossAs);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(jbossAs);

    assertThat(new ApplicationAssert(jbossAs)
        .hasNotEmbeddableCartridges(LatestVersionOf.mongoDB())
        .hasNotEmbeddableCartridges(LatestVersionOf.rockMongo()));

    // operation
    jbossAs.addEmbeddableCartridge(LatestVersionOf.mongoDB().get(user));
    jbossAs.addEmbeddableCartridge(LatestVersionOf.rockMongo().get(user));

    // verification
    assertThat(new ApplicationAssert(jbossAs)
        .hasEmbeddedCartridge(LatestVersionOf.mongoDB())
        .hasEmbeddedCartridge(LatestVersionOf.rockMongo()));
  }
View Full Code Here

      throws OpenShiftException, URISyntaxException, FileNotFoundException, IOException {
    // pre-conditions
    IApplication jbossAs = ApplicationTestUtils.getOrCreateApplication(domain);
    jbossAs = ApplicationTestUtils.destroyAndRecreateIfScalable(jbossAs);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(jbossAs);
    assertThat(new ApplicationAssert(jbossAs)
        .hasNotEmbeddableCartridges(LatestVersionOf.mongoDB())
        .hasNotEmbeddableCartridges(LatestVersionOf.rockMongo()));

    // operation
    jbossAs.addEmbeddableCartridge(LatestVersionOf.mongoDB().get(user));
    jbossAs.addEmbeddableCartridge(LatestVersionOf.rockMongo().get(user));

    // verification
    IEmbeddableCartridge rockMongo = LatestVersionOf.rockMongo().get(user);
    new EmbeddedCartridgeAssert(jbossAs.getEmbeddedCartridge(rockMongo))
        .hasUrlProperty();
    // 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(jbossAs.getName());
    assertThat(new ApplicationAssert(user2Application)).hasEmbeddedCartridges(
        LatestVersionOf.mongoDB(), LatestVersionOf.rockMongo());
    new EmbeddedCartridgeAssert(user2Application.getEmbeddedCartridge(rockMongo))
        .hasUrlProperty();
  }
View Full Code Here

  public void shouldEmbedPhpMyAdmin() throws Exception {
    // pre-conditions
    IApplication jbossAs = ApplicationTestUtils.getOrCreateApplication(domain);
    jbossAs = ApplicationTestUtils.destroyAndRecreateIfScalable(jbossAs);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(jbossAs);
    assertThat(new ApplicationAssert(jbossAs)
        .hasNotEmbeddableCartridges(LatestVersionOf.mySQL())
        .hasNotEmbeddableCartridges(LatestVersionOf.phpMyAdmin()));

    // operation
    jbossAs.addEmbeddableCartridge(LatestVersionOf.mySQL().get(user));
    jbossAs.addEmbeddableCartridge(LatestVersionOf.phpMyAdmin().get(user));

    // verification
    assertThat(new ApplicationAssert(jbossAs)
        .hasEmbeddedCartridge(LatestVersionOf.mySQL()))
        .hasEmbeddedCartridge(LatestVersionOf.phpMyAdmin());
  }
View Full Code Here

    // pre-conditions
    // pre-conditions
    IApplication jbossAs = ApplicationTestUtils.getOrCreateApplication(domain);
    jbossAs = ApplicationTestUtils.destroyAndRecreateIfScalable(jbossAs);
    EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(jbossAs);
    assertThat(new ApplicationAssert(jbossAs)
        .hasNotEmbeddableCartridges(LatestVersionOf.mySQL())
        .hasNotEmbeddableCartridges(LatestVersionOf.phpMyAdmin()));

    // operation
    jbossAs.addEmbeddableCartridge(LatestVersionOf.mySQL().get(user));
View Full Code Here

TOP

Related Classes of com.openshift.client.utils.ApplicationAssert

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.