Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-12-02 07:07:46 -0500
committerGlyn Normington2011-12-02 07:07:46 -0500
commit114a6c03ede7b4b1a8fca536ea078836cd0df209 (patch)
treeb30d3914c99927479a6c5364769c361a8809136d /org.eclipse.virgo.kernel.deployer.test/src/test/java
parent58de854a5d061a7b08b5223f000ac71a6868f185 (diff)
downloadorg.eclipse.virgo.kernel-114a6c03ede7b4b1a8fca536ea078836cd0df209.tar.gz
org.eclipse.virgo.kernel-114a6c03ede7b4b1a8fca536ea078836cd0df209.tar.xz
org.eclipse.virgo.kernel-114a6c03ede7b4b1a8fca536ea078836cd0df209.zip
Bug 315869 - test plan provisioning
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test/src/test/java')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanProvisioningTests.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanProvisioningTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanProvisioningTests.java
new file mode 100644
index 00000000..74a98ac9
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanProvisioningTests.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2011 VMware Inc.
+ * 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:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.deployer.test;
+
+import java.io.File;
+
+import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+
+public class PlanProvisioningTests extends AbstractDeployerIntegrationTest {
+
+ @Test
+ public void testDefaultProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/default.plan");
+ }
+
+ @Test
+ public void testInheritProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/inherit.plan");
+ }
+
+ @Test
+ public void testAutoProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/auto.plan");
+ }
+
+ @Test(expected = DeploymentException.class)
+ public void testDisabledProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/disabled.plan");
+ }
+
+ @Test
+ public void testAutoInheritProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/auto-inherit.plan");
+ }
+
+ @Test(expected = DeploymentException.class)
+ public void testDisabledInheritProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/disabled-inherit.plan");
+ }
+
+ @Test(expected = DeploymentException.class)
+ public void testDisabledDefaultProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/disabled-default.plan");
+ }
+
+ @Test
+ public void testParentWithExporterDisabledProvisioning() throws Exception {
+ testPlanDeployment("src/test/resources/plan-provisioning/parent-with-exporter-disabled.plan");
+ }
+
+ private void testPlanDeployment(String planPath) throws Exception {
+ DeploymentIdentity deploymentIdentity = this.deployer.deploy(new File(planPath).toURI());
+ this.deployer.undeploy(deploymentIdentity);
+ Bundle exporter = getBundle("plan.provisioning.p.exporter", Version.emptyVersion);
+ if (exporter != null) {
+ exporter.uninstall();
+ }
+ }
+
+
+}

Back to the top