use of org.graalvm.component.installer.Version in project graal by oracle.
the class CatalogContentsTest method testComponentsInPatchedGraal.
@Test
public void testComponentsInPatchedGraal() throws Exception {
initVersion("1.0.1.1");
Version v;
v = coll.findComponent("org.graalvm.ruby").getVersion();
assertEquals("1.0.1.1", v.toString());
v = coll.findComponent("org.graalvm.python").getVersion();
assertEquals("1.0.1.0", v.toString());
v = coll.findComponent("org.graalvm.r").getVersion();
assertEquals("1.0.1.1", v.toString());
}
use of org.graalvm.component.installer.Version in project graal by oracle.
the class CatalogContentsTest method testSpecificVersionNoDistUpdate.
/**
* Checks that a specific version is provided.
*/
@Test
public void testSpecificVersionNoDistUpdate() throws Exception {
initVersion("1.0.1.0");
Version v;
Version.Match vm = Version.fromString("1.1.0.0").match(Version.Match.Type.EXACT);
ComponentInfo ci = coll.findComponent("ruby", vm);
assertNull(ci);
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.GREATER);
ci = coll.findComponent("ruby", vm);
v = ci.getVersion();
assertEquals("1.0.1.1", v.toString());
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.GREATER);
v = coll.findComponent("python", vm).getVersion();
assertEquals("1.1.0.0", v.toString());
vm = Version.fromString("1.0.0.0").match(Version.Match.Type.EXACT);
ci = coll.findComponent("python", vm);
assertNull(ci);
v = coll.findComponent("org.graalvm.r").getVersion();
assertEquals("1.0.1.1", v.toString());
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.MOSTRECENT);
v = coll.findComponent("r", vm).getVersion();
assertEquals("1.0.1.1", v.toString());
}
use of org.graalvm.component.installer.Version in project graal by oracle.
the class CatalogContentsTest method testSpecificVersionDistUpdate.
/**
* Checks that a specific version is provided.
*/
@Test
public void testSpecificVersionDistUpdate() throws Exception {
initVersion("1.0.1.0");
coll.setAllowDistUpdate(true);
Version v;
Version.Match vm = Version.fromString("1.1.0.0").match(Version.Match.Type.EXACT);
ComponentInfo ci = coll.findComponent("ruby", vm);
assertNull(ci);
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.GREATER);
ci = coll.findComponent("ruby", vm);
v = ci.getVersion();
assertEquals("1.0.1.1", v.toString());
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.GREATER);
v = coll.findComponent("python", vm).getVersion();
assertEquals("1.1.0.0", v.toString());
vm = Version.fromString("1.0.0.0").match(Version.Match.Type.EXACT);
ci = coll.findComponent("python", vm);
assertNull(ci);
v = coll.findComponent("org.graalvm.r").getVersion();
assertEquals("1.1.0.1", v.toString());
vm = Version.fromString("1.0.1.0").match(Version.Match.Type.MOSTRECENT);
v = coll.findComponent("r", vm).getVersion();
assertEquals("1.1.0.1", v.toString());
}
use of org.graalvm.component.installer.Version in project graal by oracle.
the class CatalogContentsTest method testComponentsInLatestUpdate.
@Test
public void testComponentsInLatestUpdate() throws Exception {
initVersion("1.0.1.0");
Version v;
v = coll.findComponent("org.graalvm.ruby").getVersion();
assertEquals("1.0.1.1", v.toString());
v = coll.findComponent("org.graalvm.python").getVersion();
assertEquals("1.0.1.0", v.toString());
v = coll.findComponent("org.graalvm.r").getVersion();
assertEquals("1.0.1.1", v.toString());
}
use of org.graalvm.component.installer.Version in project graal by oracle.
the class CatalogCompatTest method testMixedFormatInstallUpgrades.
/**
* Checks that install will attempt to install the most recent stuff with mixed catalog. Will
* upgrade the installation
*/
@Test
public void testMixedFormatInstallUpgrades() throws Exception {
storage.graalInfo.put(CommonConstants.CAP_GRAALVM_VERSION, "1.0.0");
setupCatalogFormat1("catalogFormatMix.properties");
List<ComponentInfo> infos;
Version gv = getLocalRegistry().getGraalVersion();
registry.setAllowDistUpdate(true);
Version.Match selector = gv.match(Version.Match.Type.MOSTRECENT);
// check that versions 1.0.0-rcX are ignored for version 1.0.0
infos = new ArrayList<>(registry.loadComponents("ruby", selector, verbose));
assertNotNull(infos);
assertEquals(1, infos.size());
ComponentInfo one = infos.get(0);
assertEquals("1.0.2.0-1", one.getVersionString());
}
Aggregations