summaryrefslogtreecommitdiffstats
path: root/PolicyEngineClient/input.testCases
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:00 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:32 -0500
commit91d04c64771832a0b8815ffbe1f0f9920320d94d (patch)
treefb02d5e1c84a3d91def9a7ee95bc87f9c046cc96 /PolicyEngineClient/input.testCases
parentb9d4caa40ef8e3566ac475968bce17b9b64b6939 (diff)
Initial OpenECOMP policy/engine commit
Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'PolicyEngineClient/input.testCases')
-rw-r--r--PolicyEngineClient/input.testCases419
1 files changed, 419 insertions, 0 deletions
diff --git a/PolicyEngineClient/input.testCases b/PolicyEngineClient/input.testCases
new file mode 100644
index 000000000..edb374001
--- /dev/null
+++ b/PolicyEngineClient/input.testCases
@@ -0,0 +1,419 @@
+[
+{
+ "id": 1,
+ "testCaseDescription": "test GetConfig String Not valid",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "fail",
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 2,
+ "testCaseDescription": "test Get ConfigString Valid JSON",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "JSON",
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 3,
+ "testCaseDescription": "test Get ConfigString Valid XML",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "XML",
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 4,
+ "testCaseDescription": "test Get ConfigString Valid properties",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Properties",
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 5,
+ "testCaseDescription": "test Get ConfigString Valid other",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Other",
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 6,
+ "testCaseDescription": "test GetConfig String String Fail",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": null,
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given.",
+ ]
+},
+{
+ "id": 7,
+ "testCaseDescription": "test GetConfig String String Fail1",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": null,
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given."
+
+ ]
+},
+{
+ "id": 8,
+ "testCaseDescription": "test GetConfig String String Valid ",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "fail",
+ "ConfigName": "fail",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 9,
+ "testCaseDescription": "test GetConfig String String Valid JSON",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "JSON",
+ "ConfigName": "JSONconfig",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 10,
+ "testCaseDescription": "test GetConfig String String Valid XML",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "XML",
+ "ConfigName": "XMLconfig",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 11,
+ "testCaseDescription": "test GetConfig String String Valid properties",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Properties",
+ "ConfigName": "PropConfig",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 12,
+ "testCaseDescription": "test GetConfig String String Valid other",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Other",
+ "ConfigName": "OtherConfig",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 13,
+ "testCaseDescription": "test GetConfig String String String fail",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": null,
+ "ConfigName": null,
+ "configAttributes": null,
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given."
+ ]
+},
+{
+ "id": 14,
+ "testCaseDescription": "test GetConfig String String String fail1",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": null,
+ "ConfigName": "testFail",
+ "configAttributes": [
+ {
+ "key": "TestValue",
+ "value": "Fail",
+ },
+ ],
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given.",
+ ]
+},
+{
+ "id": 15,
+ "testCaseDescription": "test GetConfig String String String fail2",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "TestFail",
+ "ConfigName": null,
+ "configAttributes": [
+ {
+ "key": "TestValue",
+ "value": "Fail",
+ },
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 16,
+ "testCaseDescription": "test GetConfig String String String fail3",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "TestFail",
+ "ConfigName": "configFail",
+ "configAttributes": null,
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 17,
+ "testCaseDescription": "test GetConfig String String String fail4",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "TestFail",
+ "ConfigName": "configFail",
+ "configAttributes": [
+ {
+ "key": "",
+ "value": "",
+ },
+ ],
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyConfigException: Cannot have an empty Key",
+
+ ]
+},
+{
+ "id": 18,
+ "testCaseDescription": "test GetConfig String String String Valid",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "TestFail",
+ "ConfigName": "configFail",
+ "configAttributes": [
+ {
+ "key": "Action:com.test.fail",
+ "value": "Value",
+ },
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 19,
+ "testCaseDescription": "test GetConfig String String String Valid JSON",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "JSON",
+ "ConfigName": "JSONconfig",
+ "configAttributes": [
+ {
+ "key": "Resource.com:test:resource:json",
+ "value":"Test",
+ },
+ {
+ "key": "Action.com:test:action:json",
+ "value":"TestJSON",
+ },
+ {
+ "key": "Subject.com:test:subject:json",
+ "value":"TestSubject",
+ }
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 20,
+ "testCaseDescription": "test GetConfig String String String Valid XML",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "XML",
+ "ConfigName": "XMLconfig",
+ "configAttributes": [
+ {
+ "key": "Resource.com:test:resource:json",
+ "value":"Test",
+ },
+ {
+ "key": "Action.com:test:action:json",
+ "value":"TestJSON",
+ },
+ {
+ "key": "Subject.com:test:subject:json",
+ "value":"TestSubject",
+ }
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 21,
+ "testCaseDescription": "test GetConfig String String String Valid properties",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Properties",
+ "ConfigName": "PropConfig",
+ "configAttributes": [
+ {
+ "key": "Resource.com:test:resource:json",
+ "value":"Test",
+ },
+ {
+ "key": "Action.com:test:action:json",
+ "value":"TestJSON",
+ },
+ {
+ "key": "Subject.com:test:subject:json",
+ "value":"TestSubject",
+ }
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 22,
+ "testCaseDescription": "test GetConfig String String String Valid other",
+ "testFor": "getConfig",
+ "PDP_URLConfigFile": "config.properties"
+ "ECOMPName": "Other",
+ "ConfigName": "OtherConfig",
+ "configAttributes": [
+ {
+ "key": "Resource.com:test:resource:json",
+ "value":"Test",
+ },
+ {
+ "key": "Action.com:test:action:json",
+ "value":"TestJSON",
+ },
+ {
+ "key": "Subject.com:test:subject:json",
+ "value":"TestSubject",
+ }
+ ],
+ "expectedResult":[
+ "Policy Name: null Policy version: null - not_found",
+ ]
+},
+{
+ "id": 23,
+ "testCaseDescription": "test SendEvent Fail",
+ "testFor": "getAction",
+ "PDP_URLConfigFile": "config.properties",
+ "eventAttributes": null,
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyEventException: No EventAttributes Given.",
+ ]
+},
+{
+ "id": 24,
+ "testCaseDescription": "test SendEvent Fail null",
+ "testFor": "getAction",
+ "PDP_URLConfigFile": "config.properties",
+ "eventAttributes": [
+ {
+ "key": "",
+ "value": ""
+ },
+ ],
+ "expectedResult":[
+ "org.openecomp.policy.api.PolicyEventException: Cannot have an empty Key",
+
+ ]
+},
+{
+ "id": 25,
+ "testCaseDescription": "test SendEvent Not Valid",
+ "testFor": "getAction",
+ "PDP_URLConfigFile": "config.properties",
+ "eventAttributes": [
+ {
+ "key": "Action.fail",
+ "value": "Value"
+ },
+ ],
+ "expectedResult":[
+ "Decision not a Permit. : no_action",
+ ]
+},
+{
+ "id": 26,
+ "testCaseDescription": "test SendEvent Action Advised",
+ "testFor": "getAction",
+ "PDP_URLConfigFile": "config.properties",
+ "eventAttributes": [
+ {
+ "key": "Key",
+ "value": "Value"
+ },
+ {
+ "key": "cpu",
+ "value": "80"
+ },
+ ],
+ "expectedResult":[
+ "Decision not a Permit. : no_action",
+ ]
+},
+{
+ "id": 27,
+ "testCaseDescription": "test SendEvent Action Taken",
+ "testFor": "getAction",
+ "PDP_URLConfigFile": "config.properties",
+ "eventAttributes": [
+ {
+ "key": "Key",
+ "value": "Value"
+ },
+ {
+ "key": "cpu",
+ "value": "91"
+ },
+ ],
+ "expectedResult":[
+ "Decision not a Permit. : no_action",
+ ]
+},
+] \ No newline at end of file