Package com.openshift.client

Examples of com.openshift.client.IApplication


  }

  @Test
  public void shouldStopStoppedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.stop();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here


  }

  @Test
  public void shouldRestartStartedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.start();

    // operation
    application.restart();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

  }

  @Test
  public void shouldRestartStoppedApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    application.stop();

    // operation
    application.restart();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

  @Test(expected = OpenShiftEndpointException.class)
  public void shouldNotScaleDownIfNotScaledUpApplication() throws Throwable {
    // pre-condition
    ApplicationTestUtils.silentlyDestroyAllApplications(domain);
    IApplication application = domain.createApplication(
        ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.NO_SCALE);

    // operation
    application.scaleDown();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

  @Test(expected = OpenShiftEndpointException.class)
  public void shouldNotScaleUpApplication() throws Throwable {
    // pre-condition
    ApplicationTestUtils.silentlyDestroyAllApplications(domain);
    IApplication application = domain.createApplication(
            ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.NO_SCALE);

    // operation
    application.scaleUp();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

  }

  public void shouldScaleUpApplication() throws Throwable {
    // pre-condition
    ApplicationTestUtils.silentlyDestroyAllApplications(domain);
    IApplication application = domain.createApplication(
            ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user), ApplicationScale.SCALE);

    // operation
    application.scaleUp();

    // verification
    // there's currently no API to verify the application state
  }
View Full Code Here

            Samples.GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP_SCALABLE_DOWNLOADABLECART)
        .mockGetApplication("foobarz", "downloadablecart",
            GET_DOMAINS_FOOBARZ_APPLICATIONS_DOWNLOADABLECART);
   
    IDomain domain = mockDirector.getDomain("foobarz");
    IApplication downloadablecartApp = domain.getApplicationByName("downloadablecart");
    assertThat(downloadablecartApp).isNotNull();

    IEmbeddableCartridge foreman = new EmbeddableCartridge(new URL(FOREMAN_URL));
    new CartridgeAssert<IEmbeddableCartridge>(foreman)
        .hasUrl(CartridgeTestUtils.FOREMAN_URL)
        .hasName(null)
        .hasDescription(null)
        .hasDisplayName(null);

    // operation
    IEmbeddedCartridge embeddedForeman = downloadablecartApp.getEmbeddedCartridge(foreman);
    // verifications
    // embedded cartridge should get updated with name, description and display name
    new EmbeddedCartridgeAssert(embeddedForeman)
        .hasUrl(CartridgeTestUtils.FOREMAN_URL)
        .hasName("andygoldstein-foreman-0.63.0")
View Full Code Here

            "foobarz", "springeap6",
            GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_CARTRIDGES_3EMBEDDED)
        .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    IDomain domain = user.getDomain("foobarz");
    IApplication application = domain.getApplicationByName("springeap6");
    assertThat(application.getEmbeddedCartridges()).onProperty("name").contains("switchyard-0");

    // operation
    IEmbeddedCartridge switchyard = application.getEmbeddedCartridge("switchyard-0");
    // no properties in embedded block (within application)
    assertThat(switchyard.getProperties().size()).isEqualTo(0);
    switchyard.refresh();

    // verification
View Full Code Here

  }

  @Test
  public void shouldGetForwardablePorts() throws Throwable {
    // pre-conditions
    final IApplication app = domain.getApplicationByName("springeap6");
    assertThat(app).isNotNull().isInstanceOf(ApplicationResource.class);
    String rhcListPortsOutput =
        "haproxy -> 127.7.233.2:8080\n"
            + " haproxy -> 127.7.233.3:8080\n"
            + " java -> 127.7.233.1:3528\n"
View Full Code Here

  }

  @Test
  public void shouldRefreshForwardablePorts() throws Throwable {
    // pre-conditions
    final IApplication app = domain.getApplicationByName("springeap6");
    assertThat(app).isNotNull().isInstanceOf(ApplicationResource.class);
    String rhcListPortsOutput =
        "haproxy -> 127.7.233.2:8080\n"
            + " haproxy -> 127.7.233.3:8080\n"
            + " java -> 127.7.233.1:3528\n"
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.