use of org.graalvm.component.installer.remote.RemoteCatalogDownloader in project graal by oracle.
the class DirectoryChannelFactoryTest method testLoadFromEmptyDirectory.
@Test
public void testLoadFromEmptyDirectory() throws Exception {
Path nf = testFolder.newFolder().toPath();
Path ruby033 = dataFile("data/truffleruby3.jar");
Files.copy(ruby033, nf.resolve(ruby033.getFileName()));
// truffleruby3 declares that version
storage.graalInfo.put(BundleConstants.GRAAL_VERSION, "0.33-dev");
downloader = new RemoteCatalogDownloader(this, this, (URL) null);
SoftwareChannelSource scs = new SoftwareChannelSource(nf.toUri().toString());
downloader.addLocalChannelSource(scs);
ComponentInfo info = getRegistry().findComponent("ruby");
assertNotNull(info);
}
use of org.graalvm.component.installer.remote.RemoteCatalogDownloader in project graal by oracle.
the class DirectoryChannelFactoryTest method testEmptyDownloaderProducesNothing.
@Test
public void testEmptyDownloaderProducesNothing() throws Exception {
downloader = new RemoteCatalogDownloader(this, this, (URL) null);
ComponentInfo info = getRegistry().findComponent("org.graalvm.ruby");
assertNull(info);
}
use of org.graalvm.component.installer.remote.RemoteCatalogDownloader in project graal by oracle.
the class CatalogInstallTest method setupCatalog2.
private void setupCatalog2(String rel) throws IOException {
Path p = dataFile(rel);
URL u = p.toUri().toURL();
downloader = new RemoteCatalogDownloader(this, this, u);
this.registry = new CatalogContents(this, downloader.getStorage(), getLocalRegistry());
}
use of org.graalvm.component.installer.remote.RemoteCatalogDownloader 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