Examples of ICartridge


Examples of com.openshift.client.cartridge.ICartridge

      this.gears.add(new Gear(dto.getUuid(), GearState.safeValueOf(dto.getState()), dto.getSshUrl()));
    }
    this.cartridges = new ArrayList<ICartridge>();
    for(Iterator<Entry<String, CartridgeResourceDTO>> iterator = cartridgeDTOs.entrySet().iterator(); iterator.hasNext();) {
      final String cartridgeName = iterator.next().getKey();
      final ICartridge cartridge = application.getCartridge(cartridgeName);
      if(cartridge != null) {
        cartridges.add(cartridge);
      }
    }
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

      this.gears.add(new Gear(dto.getUuid(), new GearState(dto.getState()), dto.getSshUrl()));
    }
    this.cartridges = new ArrayList<ICartridge>();
    for(Iterator<Entry<String, CartridgeResourceDTO>> iterator = cartridgeDTOs.entrySet().iterator(); iterator.hasNext();) {
      final String cartridgeName = iterator.next().getKey();
      final ICartridge cartridge = application.getCartridge(cartridgeName);
      if(cartridge != null) {
        cartridges.add(cartridge);
      }
    }
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

      this.gears.add(new Gear(dto.getUuid(), new GearState(dto.getState()), dto.getSshUrl()));
    }
    this.cartridges = new ArrayList<ICartridge>();
    for(Iterator<Entry<String, CartridgeResourceDTO>> iterator = cartridgeDTOs.entrySet().iterator(); iterator.hasNext();) {
      final String cartridgeName = iterator.next().getKey();
      final ICartridge cartridge = application.getCartridge(cartridgeName);
      if(cartridge != null) {
        cartridges.add(cartridge);
      }
    }
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  @Test
  public void shouldNotHaveUrlInNonDownloadableCartridge() throws Throwable {
    // pre-conditions

    // operation
    ICartridge mysql = new BaseCartridge(CartridgeTestUtils.MYSQL_51_NAME);

    // verifications
    new CartridgeAssert<ICartridge>(mysql)
        .hasNoUrl();
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  }

  @Test
  public void shouldHaveDisplayNameInDownloadableCartridgeWithAnchor() throws Throwable {
    // pre-conditions
    ICartridge aerogear = CartridgeTestUtils.aerogear();
    // operation

   
    // verifications
    assertThat(aerogear.getDisplayName()).isEqualTo("AeroGear");
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  public void shouldNotOverrideDisplayNameWithAnchor() throws Throwable {
    // pre-conditions
    String name = "redhat";
    String displayName = "Red Hat OpenShift Cartridge";
    // operation
    ICartridge redhat = new CartridgeFake(name, new URL(CartridgeTestUtils.WILDFLY_URL), displayName);
   
    // verifications
    assertThat(redhat.getDisplayName()).isEqualTo(displayName);
    assertThat(redhat.getName()).isEqualTo(name);
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  }

  @Test
  public void shouldNotBeDownloadableCartridge() throws Throwable {
    // pre-conditions
    ICartridge jbossAsCartridge = new BaseCartridge("jboss-7");
    ICartridge jbossEapCartridge = new BaseCartridge("jbosseap-6");

    // operation
    // verifications
    assertThat(jbossAsCartridge.isDownloadable()).isFalse();
    assertThat(jbossAsCartridge.getUrl()).isNull();
    assertThat(jbossEapCartridge.isDownloadable()).isFalse();
    assertThat(jbossEapCartridge.getUrl()).isNull();
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  @Test
  public void shouldHaveObsoleteCartridges() throws MalformedURLException {
    // pre-coniditions
    // operation
    ICartridge metrics = new CartridgeNameQuery("metrics").get(connection.getCartridges(true));
    assertThat(metrics).isNotNull();
    ICartridge zend = new CartridgeNameQuery("zend-5.6").get(connection.getCartridges(true));
    assertThat(zend).isNotNull();
    ICartridge php = new LatestVersionQuery("php").get(connection.getCartridges(true));
    assertThat(php).isNotNull();
   
    // verification
    assertThat(metrics.isObsolete()).isTrue();
    assertThat(zend.isObsolete()).isTrue();
    assertThat(php.isObsolete()).isFalse();
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

    }
    if (!(ICartridge.class.isAssignableFrom(obj.getClass()))) {
      return false;
    }

    ICartridge other = (ICartridge) obj;
    // shortcut: downloadable cartridges get their name only when
    // they're deployed thus should equal on url only
    if (isDownloadable()) {
      if (other.isDownloadable()) {
        if (getUrl() == null) {
          return other.getUrl() == null;
        }
        return getUrl().equals(other.getUrl());
      }
    }
    if (getName() == null) {
      if (other.getName() != null) {
        return false;
      }
    } else if (!getName().equals(other.getName())) {
      return false;
    }
    return true;
  }
View Full Code Here

Examples of com.openshift.client.cartridge.ICartridge

  public void shouldReturnDownloadableCartridge() throws Throwable {
    // pre-conditions
    DownloadableCartridgeSpec query = new DownloadableCartridgeSpec("http://www.redhat.com");

    // operation
    ICartridge cartridge = query.get(Collections.<ICartridge> emptyList());
    Collection<ICartridge> cartridges = query.getAll(Collections.<ICartridge> emptyList());

    // verification
    assertThat(cartridge).isNotNull();
    assertThat(cartridge.isDownloadable()).isTrue();
    assertThat(cartridges).hasSize(1);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.