You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testArtifactFileAsString = FileUtils.readFileToString(
new File(RELATIVE_PREVIOUS + File.separator + testArtifactFilePath));
Problem:
When executing a unit test the xml being tested is not found because the path is wrong. The addition of RELATIVE_PREVIOUS to the artifact path makes the path unusable.
Here is my project structure:
-WSO2HelloWorldPipeline
--pom.xml (parent)
--HelloWorld
---pom.xml
--HelloWorldCompositeApplication
---pom.xml
The following is the artifact path as exposed by String testArtifactFilePath = testArtifactFileNode.getText();
When line 126 adds the ..\ to it, as you can see from the structure above, the path becomes invalid.
I am not sure what's the point of having that relative marker in the code, in a multi maven project any build command will be running from the parent anyway. I think I can work around the issue by using a maven-exec and moving folders before the test fires up but that's a workaround and this feels like a bug.
The text was updated successfully, but these errors were encountered:
Problem Class:
https://github.com/wso2/maven-tools/blob/master/wso2-synapse-unit-test-plugin/src/main/java/org/wso2/synapse/unittest/SynapseTestCaseFileReader.java
Problem Code:
Line 126:
Problem:
When executing a unit test the xml being tested is not found because the path is wrong. The addition of RELATIVE_PREVIOUS to the artifact path makes the path unusable.
Here is my project structure:
-WSO2HelloWorldPipeline
--pom.xml (parent)
--HelloWorld
---pom.xml
--HelloWorldCompositeApplication
---pom.xml
The following is the artifact path as exposed by
String testArtifactFilePath = testArtifactFileNode.getText();
\HelloWorld\src\main\synapse-config\api\helloWorld.xml
When line 126 adds the ..\ to it, as you can see from the structure above, the path becomes invalid.
I am not sure what's the point of having that relative marker in the code, in a multi maven project any build command will be running from the parent anyway. I think I can work around the issue by using a maven-exec and moving folders before the test fires up but that's a workaround and this feels like a bug.
The text was updated successfully, but these errors were encountered: