use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogInstallTest method testInstallWithDepsSingleLevel.
@Test
public void testInstallWithDepsSingleLevel() throws Exception {
setupVersion("19.3-dev");
setupCatalog(null);
paramIterable = new CatalogIterable(this, this);
textParams.add("r");
InstallCommand cmd = new InstallCommand();
cmd.init(this, withBundle(InstallCommand.class));
cmd.executionInit();
cmd.executeStep(cmd::prepareInstallation, false);
List<ComponentParam> deps = cmd.getDependencies();
assertEquals(1, deps.size());
assertEquals("org.graalvm.llvm-toolchain", deps.get(0).createMetaLoader().getComponentInfo().getId());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testWildardSorted.
@Test
public void testWildardSorted() throws Exception {
setupCatalog();
textParams.add("r*");
CatalogIterable cit = new CatalogIterable(this, this);
Iterator<ComponentParam> comps = cit.iterator();
List<String> fullIds = new ArrayList<>();
for (; comps.hasNext(); ) {
ComponentParam cp = comps.next();
fullIds.add(cp.createMetaLoader().getComponentInfo().getId());
}
assertEquals(2, fullIds.size());
assertEquals("org.graalvm.r", fullIds.get(0));
assertEquals("org.graalvm.ruby", fullIds.get(1));
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testSelectSomeComponents.
@Test
public void testSelectSomeComponents() throws Exception {
setupCatalog();
textParams.add("*mage");
textParams.add("llvm*");
CatalogIterable cit = new CatalogIterable(this, this);
Iterator<ComponentParam> comps = cit.iterator();
List<String> fullIds = new ArrayList<>();
for (; comps.hasNext(); ) {
ComponentParam cp = comps.next();
fullIds.add(cp.createMetaLoader().getComponentInfo().getId());
}
assertEquals(2, fullIds.size());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testAllComponents.
@Test
public void testAllComponents() throws Exception {
setupCatalog();
textParams.add("*");
CatalogIterable cit = new CatalogIterable(this, this);
Iterator<ComponentParam> comps = cit.iterator();
List<String> fullIds = new ArrayList<>();
for (; comps.hasNext(); ) {
ComponentParam cp = comps.next();
fullIds.add(cp.createMetaLoader().getComponentInfo().getId());
}
assertEquals(5, fullIds.size());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testUnknownComponentSpecified.
@Test
public void testUnknownComponentSpecified() throws Exception {
exception.expect(FailedOperationException.class);
exception.expectMessage("REMOTE_UnknownComponentId");
addRemoteComponent("persist/data/truffleruby3.jar", "test://graalvm.io/download/truffleruby.zip", false);
textParams.add("r");
CatalogIterable cit = new CatalogIterable(this, this);
assertTrue(cit.iterator().hasNext());
cit.iterator().next();
}
Aggregations