Package com.openshift.client.cartridge

Examples of com.openshift.client.cartridge.IEmbeddedCartridge


    // pre-conditions
    IEmbeddableCartridge mysql = new EmbeddableCartridge(CartridgeTestUtils.MYSQL_51_NAME);
    assertThat(mysql.getUrl()).isNull();

    // operation
    IEmbeddedCartridge embeddedMysql = application.getEmbeddedCartridge(mysql);
    // verifications
    new EmbeddedCartridgeAssert(embeddedMysql)
        .hasNoUrl();
  }
View Full Code Here


        .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

  @Test
  public void shouldHaveDisplayName() throws Throwable {
    // pre-conditions
    // operation
    IEmbeddedCartridge mysql = application.getEmbeddedCartridge(CartridgeTestUtils.MYSQL_51_NAME);

    // verifications
    assertThat(mysql.getDisplayName()).isEqualTo("MySQL Database 5.1");
  }
View Full Code Here

  @Test
  public void shouldHaveDescription() throws Throwable {
    // pre-conditions
    // operation
    IEmbeddedCartridge mysql = application.getEmbeddedCartridge(CartridgeTestUtils.MYSQL_51_NAME);

    // verifications
    assertThat(mysql.getDescription())
        .isEqualTo(
            "MySQL is a multi-user, multi-threaded SQL database server.");
  }
View Full Code Here

    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
    mockDirector.verifyGetApplicationCartridges(1, "foobarz", "springeap6");
    CartridgeResourceProperties properties = switchyard.getProperties();
    // 1 property in embedded block in cartridges
    assertThat(properties.size()).isEqualTo(1);
    new ResourcePropertyAssert(properties.getAll().iterator().next())
        .hasName("module_path")
        .hasDescription("Module Path")
View Full Code Here

    }
    return cartridges;
  }

  public static IEmbeddedCartridge createEmbeddedCartridgeMock(String name) {
    IEmbeddedCartridge mock = mock(IEmbeddedCartridge.class);
    when(mock.getName()).thenReturn(name);
    return mock;
  }
View Full Code Here

      assertFalse(cartridges.contains(shouldNot));
    }
  }

  private IEmbeddedCartridge getEmbeddableCartridge(String name) {
    IEmbeddedCartridge matchingCartridge = null;
    for (IEmbeddedCartridge cartridge : application.getEmbeddedCartridges()) {
      if (name.equals(cartridge.getName())) {
        matchingCartridge = cartridge;
        break;
      }
View Full Code Here

    List<IEmbeddedCartridge> embeddedCartridges = Collections.emptyList();

    LatestVersionQuery selector = new LatestVersionQuery("mysql");

    // operation
    IEmbeddedCartridge matchingCartridge = selector.get(embeddedCartridges);

    // verification
    assertThat(matchingCartridge).isNull();
  }
View Full Code Here

        "eclipsecon-2013", "community");

    LatestVersionQuery selector = new LatestVersionQuery("fun");

    // operation
    IEmbeddedCartridge matchingCartridge = selector.get(embeddedCartridges);

    // verification
    assertThat(matchingCartridge).isNull();
  }
View Full Code Here

    List<IEmbeddedCartridge> embeddedCartridges =
        CartridgeTestUtils.createEmbeddedCartridgeMocks(CartridgeTestUtils.MYSQL_51_NAME);
    LatestVersionQuery cartridgeConstraint = new LatestVersionQuery("mysql");

    // operation
    IEmbeddedCartridge matchingCartridge = cartridgeConstraint.get(embeddedCartridges);

    // verification
    assertThat(matchingCartridge).isNotNull();
    assertThat(matchingCartridge.getName()).isEqualTo(CartridgeTestUtils.MYSQL_51_NAME);
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.cartridge.IEmbeddedCartridge

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.