modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
| 47 +++++-----
modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
| 9 +
2 files changed, 33 insertions(+), 23 deletions(-)
New commits:
commit ed6424e5954ab8e78613a5d6574e105adac0cbaf
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 31 14:49:49 2011 -0400
set the data directory so we don't get changesets directory outside of the target/
dir
diff --git
a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
index f97db7c..6c5cb3a 100644
---
a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
+++
b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
@@ -1,29 +1,31 @@
- /*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
package org.rhq.core.pc;
import java.io.File;
+
import org.testng.annotations.Test;
+
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
@Test
@@ -31,6 +33,7 @@ public class PluginContainerTest {
public void testStartup() {
PluginContainerConfiguration config = new PluginContainerConfiguration();
config.setPluginFinder(new FileSystemPluginFinder(new File(".")));
+ config.setDataDirectory(new File("target/PluginContainerTest"));
PluginContainer pc = PluginContainer.getInstance();
pc.setConfiguration(config);
pc.initialize();
diff --git
a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
index 27c026a..fd3e68a 100644
---
a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
+++
b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
@@ -22,6 +22,8 @@
*/
package org.rhq.core.pc.inventory;
+import java.io.File;
+
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -30,6 +32,7 @@ import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.util.FacetLockType;
import org.rhq.core.pluginapi.availability.AvailabilityFacet;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
@@ -45,7 +48,11 @@ public class ResourceContainerTest {
@BeforeClass
public void beforeClass() {
- PluginContainer.getInstance().initialize();
+ PluginContainerConfiguration config = new PluginContainerConfiguration();
+ config.setDataDirectory(new File("target/PluginContainerTest"));
+ PluginContainer pc = PluginContainer.getInstance();
+ pc.setConfiguration(config);
+ pc.initialize();
ResourceContainer.initialize();
}
Show replies by date