You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mt...@apache.org on 2019/12/01 22:45:39 UTC
[ofbiz-framework] branch trunk updated: Improved: Move ‘ComponentContainerTest’ data to src/test/resources/ (OFBIZ-11275)
This is an automated email from the ASF dual-hosted git repository.
mthl pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 87d7465 Improved: Move ‘ComponentContainerTest’ data to src/test/resources/ (OFBIZ-11275)
87d7465 is described below
commit 87d7465306df2b7294587e4c0297360cf234ef92
Author: Mathieu Lirzin <ma...@nereide.fr>
AuthorDate: Sun Dec 1 23:34:33 2019 +0100
Improved: Move ‘ComponentContainerTest’ data to src/test/resources/ (OFBIZ-11275)
Remove unnecessary webapp declaration inside the test component
configurations.
---
.../org/apache/ofbiz/base/container/ComponentContainerTest.java | 3 ++-
.../testsdata}/applications/accounting/ofbiz-component.xml | 6 ------
.../container/testsdata}/applications/order/ofbiz-component.xml | 8 --------
3 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/framework/base/src/test/java/org/apache/ofbiz/base/container/ComponentContainerTest.java b/framework/base/src/test/java/org/apache/ofbiz/base/container/ComponentContainerTest.java
index 57be05a..480b162 100644
--- a/framework/base/src/test/java/org/apache/ofbiz/base/container/ComponentContainerTest.java
+++ b/framework/base/src/test/java/org/apache/ofbiz/base/container/ComponentContainerTest.java
@@ -43,7 +43,8 @@ public class ComponentContainerTest {
private static final Path ACCOUNTING_CONFIG = Paths.get("applications", "accounting", "config");
private static final Path[] CONFIGS = {ORDER_CONFIG, ACCOUNTING_CONFIG};
- private Path ofbizHome = Paths.get("testsdata", "ComponentContainerTest").toAbsolutePath().normalize();
+ private Path ofbizHome = Paths.get(ComponentContainerTest.class.getResource("testsdata").getFile())
+ .toAbsolutePath().normalize();
@Before
public void setUp() throws IOException {
diff --git a/testsdata/ComponentContainerTest/applications/accounting/ofbiz-component.xml b/framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/accounting/ofbiz-component.xml
similarity index 84%
rename from testsdata/ComponentContainerTest/applications/accounting/ofbiz-component.xml
rename to framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/accounting/ofbiz-component.xml
index f54aa08..6c9689f 100644
--- a/testsdata/ComponentContainerTest/applications/accounting/ofbiz-component.xml
+++ b/framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/accounting/ofbiz-component.xml
@@ -24,10 +24,4 @@ under the License.
<depends-on component-name="order" />
<resource-loader name="main" type="component"/>
<classpath type="dir" location="config"/>
- <webapp name="accounting"
- title="Accounting"
- server="default-server"
- location="webapp/accounting"
- base-permission="OFBTOOLS,ACCOUNTING"
- mount-point="/accounting"/>
</ofbiz-component>
diff --git a/testsdata/ComponentContainerTest/applications/order/ofbiz-component.xml b/framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/order/ofbiz-component.xml
similarity index 82%
rename from testsdata/ComponentContainerTest/applications/order/ofbiz-component.xml
rename to framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/order/ofbiz-component.xml
index df96f3e..9d2c2ac 100644
--- a/testsdata/ComponentContainerTest/applications/order/ofbiz-component.xml
+++ b/framework/base/src/test/resources/org/apache/ofbiz/base/container/testsdata/applications/order/ofbiz-component.xml
@@ -17,18 +17,10 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-
<ofbiz-component name="order"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
<classpath type="dir" location="config"/>
- <webapp name="order"
- title="Order"
- description="OrderComponentDescription"
- server="default-server"
- location="webapp/ordermgr"
- base-permission="OFBTOOLS,ORDERMGR"
- mount-point="/ordermgr"/>
</ofbiz-component>