Search in sources :

Example 16 with ComponentRegistry

use of org.graalvm.component.installer.model.ComponentRegistry in project graal by oracle.

the class UpgradeTest method testUpgradePythonMostRecent.

/**
 * Tests upgrade to version AT LEAST 1.0.1.
 */
@Test
public void testUpgradePythonMostRecent() throws Exception {
    initVersion("1.0.0.0");
    textParams.add("python+1.0.1");
    ComponentInfo ci = new ComponentInfo("org.graalvm.python", "Installed Python", "1.0.0.0");
    storage.installed.add(ci);
    UpgradeCommand cmd = new UpgradeCommand();
    cmd.init(this, this);
    assertEquals(0, cmd.execute());
    ComponentRegistry newReg = cmd.getProcess().getNewGraalRegistry();
    ComponentInfo python = newReg.findComponent("python");
    assertEquals("1.1.0.0", python.getVersion().toString());
}
Also used : ComponentRegistry(org.graalvm.component.installer.model.ComponentRegistry) ComponentInfo(org.graalvm.component.installer.model.ComponentInfo) Test(org.junit.Test)

Aggregations

ComponentRegistry (org.graalvm.component.installer.model.ComponentRegistry)16 Test (org.junit.Test)8 CatalogContents (org.graalvm.component.installer.model.CatalogContents)5 ComponentInfo (org.graalvm.component.installer.model.ComponentInfo)5 Path (java.nio.file.Path)4 List (java.util.List)4 CommandInput (org.graalvm.component.installer.CommandInput)4 ComponentCatalog (org.graalvm.component.installer.ComponentCatalog)4 URL (java.net.URL)3 RemoteCatalogDownloader (org.graalvm.component.installer.remote.RemoteCatalogDownloader)3 SoftwareChannelSource (org.graalvm.component.installer.SoftwareChannelSource)2 Version (org.graalvm.component.installer.Version)2 DirectoryStorage (org.graalvm.component.installer.persist.DirectoryStorage)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Properties (java.util.Properties)1 ComponentInstaller (org.graalvm.component.installer.ComponentInstaller)1 ComponentParam (org.graalvm.component.installer.ComponentParam)1 FailedOperationException (org.graalvm.component.installer.FailedOperationException)1 Feedback (org.graalvm.component.installer.Feedback)1