diff options
author | Sotiropoulos, Ioannis (is948x) <Ioannis.Sotiropoulos@amdocs.com> | 2018-07-10 17:57:43 +0100 |
---|---|---|
committer | Sotiropoulos, Ioannis (is948x) <Ioannis.Sotiropoulos@amdocs.com> | 2018-07-10 17:57:43 +0100 |
commit | d5322dbd0fa1e32d543b24824a28d6bf0a0b5497 (patch) | |
tree | 3fd9c7c2ce924395346601490e96327e47928afc /src/test/resources/event | |
parent | 600ca7e0b82c6932caa4f4ffb53e6c053525d9d5 (diff) |
Increase code coverage
Add tests to increase code coverage above 60 percent.
Issue-ID: AAI-1198
Change-Id: I4c2f964ce41d01521cc1313e32e34fb6460d49bf
Signed-off-by: Sotiropoulos, Ioannis (is948x) <Ioannis.Sotiropoulos@amdocs.com>
Diffstat (limited to 'src/test/resources/event')
8 files changed, 144 insertions, 2 deletions
diff --git a/src/test/resources/event/champ-edge-event.json b/src/test/resources/event/champ-edge-event.json new file mode 100644 index 0000000..375901a --- /dev/null +++ b/src/test/resources/event/champ-edge-event.json @@ -0,0 +1,30 @@ +{ + "header": { + "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", + "timestamp": "20180316T092301Z", + "source-name": "CHAMP", + "event-type": "update-result" + }, + "body": { + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "edge": { + "key": "test-key", + "type": "tosca.relationships.HostedOn", + "properties": { + "prevent-delete": "NONE" + }, + "source": { + "key": "50bdab41-ad1c-4d00-952c-a0aa5d827811", + "type": "vserver" + }, + "target": { + "key": "1d326bc7-b985-492b-9604-0d5d1f06f908", + "type": "pserver" + } + }, + "result": "SUCCESS" + }, + "policyViolations": [] +}
\ No newline at end of file diff --git a/src/test/resources/event/champ-vertex-event-error.json b/src/test/resources/event/champ-vertex-event-error.json new file mode 100644 index 0000000..03f3018 --- /dev/null +++ b/src/test/resources/event/champ-vertex-event-error.json @@ -0,0 +1,26 @@ +{ + "header": { + "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", + "timestamp": "20180316T092301Z", + "source-name": "CHAMP", + "event-type": "update-result", + "validation-entity-type": "pserver" + }, + "body": { + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "vertex": { + "key": "890c8b3f-892f-48e3-85cd-748ebf0426a5", + "schema-version": "v13", + "type": "pserver", + "properties": { + "hostname":"hostname1" + } + }, + "result": "FAILURE", + "error-message":"test error", + "httpErrorStatus":"INTERNAL_SERVER_ERROR" + }, + "policyViolations": [] +}
\ No newline at end of file diff --git a/src/test/resources/event/champ-vertex-event-violations.json b/src/test/resources/event/champ-vertex-event-violations.json new file mode 100644 index 0000000..ad30912 --- /dev/null +++ b/src/test/resources/event/champ-vertex-event-violations.json @@ -0,0 +1,30 @@ +{ + "header": { + "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", + "timestamp": "20180316T092301Z", + "source-name": "CHAMP", + "event-type": "update-result", + "validation-entity-type": "pserver" + }, + "body": { + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "vertex": { + "key": "890c8b3f-892f-48e3-85cd-748ebf0426a5", + "schema-version": "v13", + "type": "pserver", + "properties": { + "hostname":"hostname1", + "number-of-cpus":8 + } + }, + "result": "SUCCESS" + }, + "policyViolations": [ + { + "summary": "a summary", + "policyName": "a policy name" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/event/champ-vertex-event.json b/src/test/resources/event/champ-vertex-event.json new file mode 100644 index 0000000..815780f --- /dev/null +++ b/src/test/resources/event/champ-vertex-event.json @@ -0,0 +1,25 @@ +{ + "header": { + "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", + "timestamp": "20180316T092301Z", + "source-name": "CHAMP", + "event-type": "update-result", + "validation-entity-type": "pserver" + }, + "body": { + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "vertex": { + "key": "890c8b3f-892f-48e3-85cd-748ebf0426a5", + "schema-version": "v13", + "type": "pserver", + "properties": { + "hostname":"hostname1", + "number-of-cpus":8 + } + }, + "result": "SUCCESS" + }, + "policyViolations": [] +}
\ No newline at end of file diff --git a/src/test/resources/event/event-envelope-sentinel-no-violations.json b/src/test/resources/event/event-envelope-sentinel-no-violations.json index 88e4123..5b6f906 100644 --- a/src/test/resources/event/event-envelope-sentinel-no-violations.json +++ b/src/test/resources/event/event-envelope-sentinel-no-violations.json @@ -2,7 +2,7 @@ "header": { "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", "timestamp": "20180316T092301Z", - "source-name": "SENTINE", + "source-name": "SENTINEL", "event-type": "update-result", "validation-entity-type": "pserver" }, diff --git a/src/test/resources/event/event-envelope-sentinel.json b/src/test/resources/event/event-envelope-sentinel.json index 91e6c76..567e7d3 100644 --- a/src/test/resources/event/event-envelope-sentinel.json +++ b/src/test/resources/event/event-envelope-sentinel.json @@ -2,7 +2,7 @@ "header": { "request-id": "5cf7f973-c406-4507-ad71-72d7b3d26c36", "timestamp": "20180316T092301Z", - "source-name": "SENTINE", + "source-name": "SENTINEL", "event-type": "update-result", "validation-entity-type": "pserver" }, diff --git a/src/test/resources/event/graph-edge-event.json b/src/test/resources/event/graph-edge-event.json new file mode 100644 index 0000000..30fe94f --- /dev/null +++ b/src/test/resources/event/graph-edge-event.json @@ -0,0 +1,19 @@ +{ + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "edge": { + "type": "tosca.relationships.HostedOn", + "properties": { + "prevent-delete": "NONE" + }, + "source": { + "key": "50bdab41-ad1c-4d00-952c-a0aa5d827811", + "type": "vserver" + }, + "target": { + "key": "1d326bc7-b985-492b-9604-0d5d1f06f908", + "type": "pserver" + } + } +} diff --git a/src/test/resources/event/graph-vertex-event.json b/src/test/resources/event/graph-vertex-event.json new file mode 100644 index 0000000..2dcfaee --- /dev/null +++ b/src/test/resources/event/graph-vertex-event.json @@ -0,0 +1,12 @@ +{ + "operation": "CREATE", + "transaction-id": "6544a144-0c56-4f71-81d8-a6170efbb296", + "timestamp": 1521192181065, + "vertex": { + "schema-version": "v13", + "type": "pserver", + "properties": { + "hostname":"hostname1" + } + } +}
\ No newline at end of file |