Package com.openshift.client

Examples of com.openshift.client.IApplication


 
    @Test
    public void shouldLoadEmptyMapOfEnvironmentVariables() throws Throwable{
        //precondition
        ApplicationTestUtils.silentlyDestroyAllApplications(domain);
        IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);

        //operation
        Map<String, IEnvironmentVariable> environmentVariables = application.getEnvironmentVariables();

        //verifications
        assertThat(environmentVariables).isEmpty();
    }
View Full Code Here


    }

  @Test
  public void shouldCanGetCanUpdateEnvironmentVariables() throws Throwable {
    // pre-conditions
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);

    // operation
        // verifications
    assertThat(application.canUpdateEnvironmentVariables()).isTrue();
    //verify list environment variables
    assertThat(application.canGetEnvironmentVariables()).isTrue();
  }
View Full Code Here

  }
 
  @Test
  public void shouldGetDeploymentType() throws Throwable {
    // pre-conditions
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);

    // operation
        // verifications
    assertThat(application.getDeploymentType()).isIn(DeploymentTypes.getAll());
  }
View Full Code Here

  }

  @Test
  public void shouldUpdateDeploymentType() throws Throwable {
    // pre-conditions
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    String deploymentType = application.getDeploymentType();
    String newDeploymentType = DeploymentTypes.switchType(deploymentType);
   
    // operation
    application.setDeploymentType(newDeploymentType);
    // verifications
    assertThat(application.getDeploymentType()).isEqualTo(newDeploymentType);
  }
View Full Code Here

  }

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

    // operation
    Collection<IGearGroup> gearGroups = application.getGearGroups();

    // verification
    assertThat(gearGroups.size()).isGreaterThanOrEqualTo(1);
    assertThat(new GearGroupsAssert(gearGroups))
        .assertGroup(0).hasUUID().hasGears()
View Full Code Here

  }
 
  @Test
  public void shouldDestroyApplication() throws Exception {
    // pre-condition
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    assertThat(application.getName()).isNotEmpty();

    // operation
    application.destroy();

    // verification
    assertThat(domain.getApplications()).excludes(application);
  }
View Full Code Here

  }
 
  @Test
  public void shouldNotFindApplicationByNameIfApplicationIsDestroyed() throws Throwable {
    // pre-conditions
    IApplication application = ApplicationTestUtils.getOrCreateApplication(domain);
    assertThat(application).isNotNull();
    String name = application.getName();
   
    // operation
    application.destroy();

    // verifications
    assertThat(domain.getApplicationByName(name)).isNull();
  }
View Full Code Here

  }

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

    // operation
    application.stop();
  }
View Full Code Here

  }

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

    // operation
    application.start();
  }
View Full Code Here

  }

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

    // operation
    application.start();

    // verification
    // there's currently no API to verify the application state
  }
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.