use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testReadComponentMetadataNoNetwork.
@Test
public void testReadComponentMetadataNoNetwork() throws Exception {
addRemoteComponent("persist/data/truffleruby3.jar", "test://graalvm.io/download/truffleruby.zip", false);
textParams.add("ruby");
CatalogIterable cit = new CatalogIterable(this, this);
assertTrue(cit.iterator().hasNext());
for (ComponentParam p : cit) {
URL remoteU = p.createMetaLoader().getComponentInfo().getRemoteURL();
assertEquals(url, remoteU);
}
assertFalse(Handler.isVisited(url));
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class CatalogIterableTest method testNoWildcards.
/**
* Checks that a parameter without wildcards will act as a literal.
*/
@Test
public void testNoWildcards() throws Exception {
setupCatalog();
textParams.add("ruby");
CatalogIterable cit = new CatalogIterable(this, this);
Iterator<ComponentParam> comps = cit.iterator();
ComponentParam c;
c = comps.next();
assertFalse(comps.hasNext());
assertEquals("org.graalvm.ruby", c.createMetaLoader().getComponentInfo().getId());
}
use of org.graalvm.component.installer.remote.CatalogIterable in project graal by oracle.
the class InfoTest method initVersion.
private Version initVersion(String s) throws IOException {
Version v = Version.fromString(s);
storage.graalInfo.put(BundleConstants.GRAAL_VERSION, v.toString());
Path catalogPath = dataFile("../repo/catalog.properties");
RemoteCatalogDownloader downloader = new RemoteCatalogDownloader(this, this, catalogPath.toUri().toURL());
registry = new CatalogContents(this, downloader.getStorage(), localRegistry);
paramIterable = new CatalogIterable(this, this);
return v;
}
Aggregations