Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/.classpath12
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java17
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java13
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java20
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.parbin942 -> 1015 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jarbin1973 -> 0 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war0
8 files changed, 44 insertions, 20 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/.classpath b/org.eclipse.virgo.kernel.deployer.test/.classpath
index 1bce5559..ae2f7143 100644
--- a/org.eclipse.virgo.kernel.deployer.test/.classpath
+++ b/org.eclipse.virgo.kernel.deployer.test/.classpath
@@ -28,18 +28,18 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.5.RELEASE/org.springframework.orm-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.5.RELEASE/org.springframework.orm-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.5.RELEASE/org.springframework.transaction-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.5.RELEASE/org.springframework.transaction-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-sources-1.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120717181632/org.eclipse.virgo.util.math-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120711093701/org.eclipse.virgo.test.framework-3.6.0.D-20120711093701.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120717182335/org.eclipse.virgo.test.framework-3.6.0.D-20120717182335.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.launcher-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.5.0.D-20120615065435/org.eclipse.virgo.osgi.launcher-sources-3.5.0.D-20120615065435.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.model"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
index 93017532..c6c15495 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
@@ -31,6 +31,7 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
@@ -118,6 +119,8 @@ public class DMSPlanDeploymentTests extends AbstractDeployerIntegrationTest {
if (propertiesFile != null) {
checkConfigUnavailable(pid);
}
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
private void assertBundlesNotInstalled(Bundle[] bundles, String... candidateBsns) {
@@ -131,6 +134,20 @@ public class DMSPlanDeploymentTests extends AbstractDeployerIntegrationTest {
}
}
+ private void uninstallBundles(Bundle[] bundles, String... uninstallBsns) {
+ for (Bundle bundle : bundles) {
+ String symbolicName = bundle.getSymbolicName();
+ for (String uninstallBsn : uninstallBsns) {
+ if (uninstallBsn.equals(symbolicName)) {
+ try {
+ bundle.uninstall();
+ } catch (BundleException _) {
+ }
+ }
+ }
+ }
+ }
+
private void checkConfigAvailable(String pid, File propertiesFile) throws IOException {
Configuration configuration = this.configAdmin.getConfiguration(pid, null);
Dictionary<String, Object> dictionary = configuration.getProperties();
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
index 8777c965..99037a11 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
@@ -263,17 +263,4 @@ public class DeployerEdgeTests extends AbstractDeployerIntegrationTest {
this.appDeployer.deploy(dirURI);
}
- @Test(expected = DeploymentException.class)
- public void testWar() throws Exception {
- URI warURI = new File("src/test/resources/waralientokernel.war").toURI();
-
- this.appDeployer.deploy(warURI);
- }
-
- @Test(expected = DeploymentException.class)
- public void testInvalidDigest() throws Exception {
- URI warURI = new File("src/test/resources/invalidDigest.jar").toURI();
-
- this.appDeployer.deploy(warURI);
- }
}
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
index ff3d1262..062561d1 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
@@ -142,6 +142,8 @@ public class PlanDeploymentTests extends AbstractDeployerIntegrationTest {
if (propertiesFile != null) {
checkConfigUnavailable(pid);
}
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
private void testPlanDeploymentStartingEvents(File plan, String... candidateBsns) throws Exception {
@@ -179,8 +181,24 @@ public class PlanDeploymentTests extends AbstractDeployerIntegrationTest {
this.deployer.undeploy(deploymentIdentity);
Bundle[] afterUndeployBundles = this.context.getBundles();
assertBundlesNotInstalled(afterUndeployBundles, candidateBsns);
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
-
+
+ private void uninstallBundles(Bundle[] bundles, String... uninstallBsns) {
+ for (Bundle bundle : bundles) {
+ String symbolicName = bundle.getSymbolicName();
+ for (String uninstallBsn : uninstallBsns) {
+ if (uninstallBsn.equals(symbolicName)) {
+ try {
+ bundle.uninstall();
+ } catch (BundleException _) {
+ }
+ }
+ }
+ }
+ }
+
private class StartBundleRunnable implements Runnable {
BundleContext context = null;
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
index 9d192332..50e50309 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
@@ -1,3 +1,5 @@
deployer.timeout= 300
deployer.pickupDirectory= target/pickup
deployer.systemArtifacts=
+deployer.unpackBundles=false
+
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
index 4cad753d..3222f4cc 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
Binary files differ
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar
deleted file mode 100644
index a046c15c..00000000
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war
deleted file mode 100644
index e69de29b..00000000
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war
+++ /dev/null

Back to the top