Search in sources :

Example 11 with BundleDTO

use of org.osgi.framework.dto.BundleDTO in project bnd by bndtools.

the class AgentTest method testAgentInstallBundleFromURL.

public void testAgentInstallBundleFromURL() throws Exception {
    BundleDTO bundle = supervisor.getAgent().installFromURL(t3.getAbsolutePath(), t3.toURI().toURL().toExternalForm());
    assertNotNull(bundle);
    assertEquals(4, bundle.id);
    assertEquals("bsn-3", bundle.symbolicName);
    assertEquals("3.0.0", bundle.version);
    assertEquals(5, supervisor.getAgent().getBundles().size());
}
Also used : BundleDTO(org.osgi.framework.dto.BundleDTO)

Example 12 with BundleDTO

use of org.osgi.framework.dto.BundleDTO in project bnd by bndtools.

the class AgentTest method testAgentInstallBundle.

public void testAgentInstallBundle() throws Exception {
    String sha = supervisor.addFile(t3);
    BundleDTO bundle = supervisor.getAgent().install(t3.getAbsolutePath(), sha);
    assertNotNull(bundle);
    assertEquals(4, bundle.id);
    assertEquals("bsn-3", bundle.symbolicName);
    assertEquals("3.0.0", bundle.version);
}
Also used : BundleDTO(org.osgi.framework.dto.BundleDTO)

Aggregations

BundleDTO (org.osgi.framework.dto.BundleDTO)12 File (java.io.File)3 ArrayList (java.util.ArrayList)3 Version (aQute.bnd.version.Version)2 ObjectName (javax.management.ObjectName)2 Bundle (org.osgi.framework.Bundle)2 Agent (aQute.remote.api.Agent)1 LauncherSupervisor (aQute.remote.plugin.LauncherSupervisor)1 JMXBundleDeployer (aQute.remote.util.JMXBundleDeployer)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 MalformedObjectNameException (javax.management.MalformedObjectNameException)1 CompositeData (javax.management.openmbean.CompositeData)1 TabularData (javax.management.openmbean.TabularData)1