summaryrefslogtreecommitdiffstats
path: root/auth/cli-codegen/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-11-06 12:02:46 +0000
committerliamfallon <liam.fallon@ericsson.com>2018-11-07 12:41:09 +0000
commit53d8916cc60d97e2ce7ae345f8cc25f5602567da (patch)
treeee2f3a8e543c31993c51a58257354ccffb648dfe /auth/cli-codegen/src
parent9dc414a0cabc9074e87a7c9cd5c3e5ceee733e5a (diff)
Refactor unit test data
There were many copies of test policies and examples strewn through the Apex unit tests. This change cleans up the unit tests so that a single version of all example policies is used in all tests. Also added a new relative file root command line parameter to Apex to allow the root of relative paths in configuration files to be set. Apologies for the size of this review but unfortunately all of this must be done in one shot. Issue-ID: POLICY-1252 Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'auth/cli-codegen/src')
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java2
-rw-r--r--auth/cli-codegen/src/test/resources/models/TestPolicyModel.json (renamed from auth/cli-codegen/src/test/resources/models/SamplePolicyModel.json)0
2 files changed, 1 insertions, 1 deletions
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java
index 968891d06..13f0bc0e6 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java
@@ -80,7 +80,7 @@ public class CliCodegenTest {
AxPolicyModel apexPolicyModel = null;
try {
apexPolicyModel = modelReader
- .read(new FileInputStream(new File("src/test/resources/models/SamplePolicyModel.json")));
+ .read(new FileInputStream(new File("src/test/resources/models/TestPolicyModel.json")));
} catch (ApexModelException | FileNotFoundException e) {
fail("test should not throw an exception");
}
diff --git a/auth/cli-codegen/src/test/resources/models/SamplePolicyModel.json b/auth/cli-codegen/src/test/resources/models/TestPolicyModel.json
index 2dc4bcd3f..2dc4bcd3f 100644
--- a/auth/cli-codegen/src/test/resources/models/SamplePolicyModel.json
+++ b/auth/cli-codegen/src/test/resources/models/TestPolicyModel.json