Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2011-12-28 13:15:04 +0000
committerFlorian Waibel2011-12-28 13:15:04 +0000
commit51a2b96b9066e279e1bdc980a26495a3b2b18ae0 (patch)
treed1c9c38a3eb1f7a6d6678bf658af2f2f9acc8eb9 /org.eclipse.virgo.kernel.deployer.test/src/test
parent53b6c5396d1cd86e91cb56b79aebfabc9fce355d (diff)
downloadorg.eclipse.virgo.kernel-51a2b96b9066e279e1bdc980a26495a3b2b18ae0.tar.gz
org.eclipse.virgo.kernel-51a2b96b9066e279e1bdc980a26495a3b2b18ae0.tar.xz
org.eclipse.virgo.kernel-51a2b96b9066e279e1bdc980a26495a3b2b18ae0.zip
#365034 - Added (green?) integration tests for 3.
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test/src/test')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithNestedDAGTests.java38
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.one.plan11
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.two.plan11
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicNested.plan12
4 files changed, 72 insertions, 0 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithNestedDAGTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithNestedDAGTests.java
new file mode 100644
index 00000000..f6840905
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentWithNestedDAGTests.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 EclipseSource
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * EclipseSource - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.deployer.test;
+
+import static org.eclipse.virgo.kernel.deployer.test.PlanDeploymentTests.assertBundlesInstalled;
+import static org.eclipse.virgo.kernel.deployer.test.PlanDeploymentTests.assertBundlesNotInstalled;
+
+import java.io.File;
+
+import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
+import org.junit.Test;
+
+public class PlanDeploymentWithNestedDAGTests extends AbstractDeployerIntegrationTest {
+
+ private static final String BUNDLE_ONE_SYMBOLIC_NAME = "simple.bundle.one";
+
+ @Test
+ // 3. (@see https://bugs.eclipse.org/bugs/show_bug.cgi?id=365034)
+ public void testNestedPlanWithSharedBundle() throws Exception {
+
+ DeploymentIdentity deploymentIdentity = this.deployer.deploy(new File("src/test/resources/testunscopednonatomicNested.plan").toURI());
+ assertBundlesInstalled(this.context.getBundles(), BUNDLE_ONE_SYMBOLIC_NAME);
+ // TODO - check that the bundle in installed once?!
+
+ this.deployer.undeploy(deploymentIdentity);
+ assertBundlesNotInstalled(this.context.getBundles(), BUNDLE_ONE_SYMBOLIC_NAME);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.one.plan b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.one.plan
new file mode 100644
index 00000000..74b73214
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.one.plan
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plan name="simple.plan.one" version="1.0.0" scoped="false" atomic="false"
+ xmlns="http://www.eclipse.org/virgo/schema/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.eclipse.org/virgo/schema/plan
+ http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
+
+ <artifact type="bundle" name="simple.bundle.one" version="[1, 2)"/>
+
+</plan> \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.two.plan b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.two.plan
new file mode 100644
index 00000000..0d04fac6
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/plan-deployment/simple.plan.two.plan
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plan name="simple.plan.two" version="1.0.0" scoped="false" atomic="false"
+ xmlns="http://www.eclipse.org/virgo/schema/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.eclipse.org/virgo/schema/plan
+ http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
+
+ <artifact type="bundle" name="simple.bundle.one" version="[1, 2)"/>
+
+</plan> \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicNested.plan b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicNested.plan
new file mode 100644
index 00000000..1b7a4ee7
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/testunscopednonatomicNested.plan
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plan name="nestedPlansWithSharedBundle.plan" version="1.0.0" scoped="false" atomic="false"
+ xmlns="http://www.eclipse.org/virgo/schema/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.eclipse.org/virgo/schema/plan
+ http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
+
+ <artifact type="plan" name="simple.plan.one" version="[0, 2)"/>
+ <artifact type="plan" name="simple.plan.two" version="[0, 2)"/>
+
+</plan>

Back to the top