Package org.cloudfoundry.client.lib.domain

Examples of org.cloudfoundry.client.lib.domain.Staging


  public void uploadStandaloneApplicationWithURLs() throws IOException {
    String appName = namespacedAppName("standalone-node");
    List<String> uris = new ArrayList<String>();
    uris.add(computeAppUrl(appName));
    List<String> services = new ArrayList<String>();
    Staging staging = new Staging("node app.js", null);
    File file = SampleProjects.standaloneNode();
    connectedClient.createApplication(appName, staging, 64, uris, services);
    connectedClient.uploadApplication(appName, file.getCanonicalPath());
    connectedClient.startApplication(appName);
    CloudApplication app = connectedClient.getApplication(appName);
View Full Code Here


    assertEquals(CloudApplication.AppState.STARTED, app.getState());
    assertEquals(uris, app.getUris());
    assertEquals("ruby simple.rb", app.getStaging().getCommand());
    connectedClient.stopApplication(appName);

    Staging newStaging = new Staging("ruby simple.rb test", "https://github.com/cloudfoundry/heroku-buildpack-ruby");
    connectedClient.updateApplicationStaging(appName, newStaging);
    app = connectedClient.getApplication(appName);
    assertNotNull(app);
    assertEquals(uris, app.getUris());
    assertEquals("ruby simple.rb test", app.getStaging().getCommand());
View Full Code Here

    @Test
  public void uploadSinatraApp() throws IOException {
    String appName = namespacedAppName("env");
    ClassPathResource cpr = new ClassPathResource("apps/env/");
    File explodedDir = cpr.getFile();
    Staging staging = new Staging();
    createAndUploadExplodedTestApp(appName, explodedDir, staging);
    connectedClient.startApplication(appName);
    CloudApplication env = connectedClient.getApplication(appName);
    assertEquals(CloudApplication.AppState.STARTED, env.getState());
  }
View Full Code Here

    uris.add(computeAppUrl(appName));

    File war = SampleProjects.nonAsciFileName();
    List<String> serviceNames = new ArrayList<String>();

    connectedClient.createApplication(appName, new Staging(),
        DEFAULT_MEMORY, uris, serviceNames);
    connectedClient.uploadApplication(appName, war.getCanonicalPath());

    CloudApplication app = connectedClient.getApplication(appName);
    assertNotNull(app);
View Full Code Here

  private CloudApplication createAndUploadExplodedSpringTestApp(String appName)
      throws IOException {
    File explodedDir = SampleProjects.springTravelUnpacked(temporaryFolder);
    assertTrue("Expected exploded test app at " + explodedDir.getCanonicalPath(), explodedDir.exists());
    createTestApp(appName, null, new Staging());
    connectedClient.uploadApplication(appName, explodedDir.getCanonicalPath());
    return connectedClient.getApplication(appName);
  }
View Full Code Here

    connectedClient.uploadApplication(appName, explodedDir.getCanonicalPath());
    return connectedClient.getApplication(appName);
  }

  private void createStandaloneRubyTestApp(String appName, List<String> uris, List<String> services) throws IOException {
    Staging staging = new Staging("ruby simple.rb", null);
    File file = SampleProjects.standaloneRuby();
    connectedClient.createApplication(appName, staging, 128, uris, services);
    connectedClient.uploadApplication(appName, file.getCanonicalPath());
  }
View Full Code Here

    connectedClient.createApplication(appName, staging, 128, uris, services);
    connectedClient.uploadApplication(appName, file.getCanonicalPath());
  }

  private void createSpringApplication(String appName) {
    createTestApp(appName, null, new Staging());
  }
View Full Code Here

  private void createSpringApplication(String appName) {
    createTestApp(appName, null, new Staging());
  }

  private void createSpringApplication(String appName, List<String> serviceNames) {
    createTestApp(appName, serviceNames, new Staging());
  }
View Full Code Here

  private void createSpringApplication(String appName, List<String> serviceNames) {
    createTestApp(appName, serviceNames, new Staging());
  }

  private void createSpringApplication(String appName, String buildpackUrl) {
    createTestApp(appName, null, new Staging(null, buildpackUrl));
  }
View Full Code Here

  private void createSpringApplication(String appName, String buildpackUrl) {
    createTestApp(appName, null, new Staging(null, buildpackUrl));
  }

  private void createSpringApplication(String appName, String stack, Integer healthCheckTimeout) {
    createTestApp(appName, null, new Staging(null, null, stack, healthCheckTimeout));
  }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.domain.Staging

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.