modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java | 4 - modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java | 8 +- modules/plugins/ant-bundle/src/test/resources/test-build.xml | 33 +++++----- 3 files changed, 24 insertions(+), 21 deletions(-)
New commits: commit ffe84cae9d1c490df76047d26fb1fe85d6617f23 Author: John Mazzitelli mazz@redhat.com Date: Thu May 27 08:56:08 2010 -0400
fiddle with some test code - these still won't pass - still need to wait for the ant stuff to be completed
diff --git a/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java b/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java index cd0e4c1..2eb1d85 100644 --- a/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java +++ b/modules/plugins/ant-bundle/src/main/java/org/rhq/plugins/ant/AntBundlePluginComponent.java @@ -166,9 +166,7 @@ public class AntBundlePluginComponent implements ResourceComponent, BundleFacet
int deploymentId = bundleDeployment.getId(); antProps.setProperty(DeployPropertyNames.DEPLOY_ID, Integer.toString(deploymentId)); - if (bundleDeployment.getName() != null) { - antProps.setProperty(DeployPropertyNames.DEPLOY_NAME, bundleDeployment.getName()); - } + antProps.setProperty(DeployPropertyNames.DEPLOY_NAME, bundleDeployment.getName()); antProps.setProperty(DeployPropertyNames.DEPLOY_REVERT, String.valueOf(request.isRevert())); antProps.setProperty(DeployPropertyNames.DEPLOY_CLEAN, String.valueOf(request.isCleanDeployment()));
diff --git a/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java b/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java index 6a9d845..c4dc63e 100644 --- a/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java +++ b/modules/plugins/ant-bundle/src/test/java/org/rhq/plugins/ant/AntBundlePluginComponentTest.java @@ -57,7 +57,7 @@ import org.rhq.core.system.SystemInfoFactory; import org.rhq.core.util.file.FileUtil; import org.rhq.core.util.stream.StreamUtil;
-@Test +@Test(enabled = false) public class AntBundlePluginComponentTest { private static final String USER_HOME = System.getProperty("user.home");
@@ -84,12 +84,11 @@ public class AntBundlePluginComponentTest { this.plugin.start(context); }
- @AfterMethod + @AfterMethod(alwaysRun = true) public void cleanTmpDir() { FileUtil.purge(this.tmpDir, true); }
- @Test(enabled = false) /** * Test a simple Ant script that contains no RHQ tasks other than rhq:bundle. */ @@ -103,6 +102,7 @@ public class AntBundlePluginComponentTest { getRecipeFromFile("test-bundle-v1.xml"));
BundleDeployment deployment = new BundleDeployment(); + deployment.setName("test bundle deployment name"); deployment.setBundleVersion(bundleVersion); deployment.setConfiguration(null);
@@ -124,7 +124,6 @@ public class AntBundlePluginComponentTest { /** * Test a Ant script that includes all of the RHQ tasks. */ - @Test(enabled = false) public void testAntBundle() throws Exception { ResourceType resourceType = new ResourceType("testSimpleBundle", "plugin", ResourceCategory.SERVER, null); BundleType bundleType = new BundleType("testSimpleBundle", resourceType); @@ -141,6 +140,7 @@ public class AntBundlePluginComponentTest { config.put(new PropertySimple("custom.prop2", "custom property 2"));
BundleDeployment deployment = new BundleDeployment(); + deployment.setName("test bundle deployment name"); deployment.setBundleVersion(bundleVersion); deployment.setConfiguration(config); deployment.setDestination(destination); diff --git a/modules/plugins/ant-bundle/src/test/resources/test-build.xml b/modules/plugins/ant-bundle/src/test/resources/test-build.xml index e4e062b..6ab366a 100644 --- a/modules/plugins/ant-bundle/src/test/resources/test-build.xml +++ b/modules/plugins/ant-bundle/src/test/resources/test-build.xml @@ -5,20 +5,25 @@
<echo>basedir=${basedir}</echo>
- <rhq:bundle name="example.com (JBoss EAP 4.3)" version="1.0" - description="example.com corporate website hosted on JBoss EAP 4.3"/> - - <rhq:input-property - name="custom.prop1" - description="my prop 1" - required="true" - defaultValue="default 1"/> - - <rhq:input-property - name="custom.prop2" - description="my prop 2" - required="true" - defaultValue="default 2"/> + <rhq:bundle name="example.com (JBoss EAP 4.3)" + version="1.0" + description="example.com corporate website hosted on JBoss EAP 4.3" > + <rhq:input-property + name="custom.prop1" + description="my prop 1" + required="true" + defaultValue="default 1"/> + + <rhq:input-property + name="custom.prop2" + description="my prop 2" + required="true" + defaultValue="default 2"/> + + <rhq:deployment name="test-product"> + <rhq:file name="product.zip"/> + </rhq:deployment> + </rhq:bundle>
<property name="outfile" value="${basedir}/output.2" />
rhq-commits@lists.fedorahosted.org