blob: edb374001221ff810c8afb6781fc30f1c81deb15 [file] [log] [blame]
Pamela Dragosh91d04c62017-02-14 19:41:00 -05001[
2{
3 "id": 1,
4 "testCaseDescription": "test GetConfig String Not valid",
5 "testFor": "getConfig",
6 "PDP_URLConfigFile": "config.properties"
7 "ECOMPName": "fail",
8 "ConfigName": null,
9 "configAttributes": null,
10 "expectedResult":[
11 "Policy Name: null Policy version: null - not_found",
12 ]
13},
14{
15 "id": 2,
16 "testCaseDescription": "test Get ConfigString Valid JSON",
17 "testFor": "getConfig",
18 "PDP_URLConfigFile": "config.properties"
19 "ECOMPName": "JSON",
20 "ConfigName": null,
21 "configAttributes": null,
22 "expectedResult":[
23 "Policy Name: null Policy version: null - not_found",
24 ]
25},
26{
27 "id": 3,
28 "testCaseDescription": "test Get ConfigString Valid XML",
29 "testFor": "getConfig",
30 "PDP_URLConfigFile": "config.properties"
31 "ECOMPName": "XML",
32 "ConfigName": null,
33 "configAttributes": null,
34 "expectedResult":[
35 "Policy Name: null Policy version: null - not_found",
36 ]
37},
38{
39 "id": 4,
40 "testCaseDescription": "test Get ConfigString Valid properties",
41 "testFor": "getConfig",
42 "PDP_URLConfigFile": "config.properties"
43 "ECOMPName": "Properties",
44 "ConfigName": null,
45 "configAttributes": null,
46 "expectedResult":[
47 "Policy Name: null Policy version: null - not_found",
48 ]
49},
50{
51 "id": 5,
52 "testCaseDescription": "test Get ConfigString Valid other",
53 "testFor": "getConfig",
54 "PDP_URLConfigFile": "config.properties"
55 "ECOMPName": "Other",
56 "ConfigName": null,
57 "configAttributes": null,
58 "expectedResult":[
59 "Policy Name: null Policy version: null - not_found",
60 ]
61},
62{
63 "id": 6,
64 "testCaseDescription": "test GetConfig String String Fail",
65 "testFor": "getConfig",
66 "PDP_URLConfigFile": "config.properties"
67 "ECOMPName": null,
68 "ConfigName": null,
69 "configAttributes": null,
70 "expectedResult":[
71 "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given.",
72 ]
73},
74{
75 "id": 7,
76 "testCaseDescription": "test GetConfig String String Fail1",
77 "testFor": "getConfig",
78 "PDP_URLConfigFile": "config.properties"
79 "ECOMPName": null,
80 "ConfigName": null,
81 "configAttributes": null,
82 "expectedResult":[
83 "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given."
84
85 ]
86},
87{
88 "id": 8,
89 "testCaseDescription": "test GetConfig String String Valid ",
90 "testFor": "getConfig",
91 "PDP_URLConfigFile": "config.properties"
92 "ECOMPName": "fail",
93 "ConfigName": "fail",
94 "configAttributes": null,
95 "expectedResult":[
96 "Policy Name: null Policy version: null - not_found",
97 ]
98},
99{
100 "id": 9,
101 "testCaseDescription": "test GetConfig String String Valid JSON",
102 "testFor": "getConfig",
103 "PDP_URLConfigFile": "config.properties"
104 "ECOMPName": "JSON",
105 "ConfigName": "JSONconfig",
106 "configAttributes": null,
107 "expectedResult":[
108 "Policy Name: null Policy version: null - not_found",
109 ]
110},
111{
112 "id": 10,
113 "testCaseDescription": "test GetConfig String String Valid XML",
114 "testFor": "getConfig",
115 "PDP_URLConfigFile": "config.properties"
116 "ECOMPName": "XML",
117 "ConfigName": "XMLconfig",
118 "configAttributes": null,
119 "expectedResult":[
120 "Policy Name: null Policy version: null - not_found",
121 ]
122},
123{
124 "id": 11,
125 "testCaseDescription": "test GetConfig String String Valid properties",
126 "testFor": "getConfig",
127 "PDP_URLConfigFile": "config.properties"
128 "ECOMPName": "Properties",
129 "ConfigName": "PropConfig",
130 "configAttributes": null,
131 "expectedResult":[
132 "Policy Name: null Policy version: null - not_found",
133 ]
134},
135{
136 "id": 12,
137 "testCaseDescription": "test GetConfig String String Valid other",
138 "testFor": "getConfig",
139 "PDP_URLConfigFile": "config.properties"
140 "ECOMPName": "Other",
141 "ConfigName": "OtherConfig",
142 "configAttributes": null,
143 "expectedResult":[
144 "Policy Name: null Policy version: null - not_found",
145 ]
146},
147{
148 "id": 13,
149 "testCaseDescription": "test GetConfig String String String fail",
150 "testFor": "getConfig",
151 "PDP_URLConfigFile": "config.properties"
152 "ECOMPName": null,
153 "ConfigName": null,
154 "configAttributes": null,
155 "expectedResult":[
156 "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given."
157 ]
158},
159{
160 "id": 14,
161 "testCaseDescription": "test GetConfig String String String fail1",
162 "testFor": "getConfig",
163 "PDP_URLConfigFile": "config.properties"
164 "ECOMPName": null,
165 "ConfigName": "testFail",
166 "configAttributes": [
167 {
168 "key": "TestValue",
169 "value": "Fail",
170 },
171 ],
172 "expectedResult":[
173 "org.openecomp.policy.api.PolicyConfigException: No eCOMPComponentName given.",
174 ]
175},
176{
177 "id": 15,
178 "testCaseDescription": "test GetConfig String String String fail2",
179 "testFor": "getConfig",
180 "PDP_URLConfigFile": "config.properties"
181 "ECOMPName": "TestFail",
182 "ConfigName": null,
183 "configAttributes": [
184 {
185 "key": "TestValue",
186 "value": "Fail",
187 },
188 ],
189 "expectedResult":[
190 "Policy Name: null Policy version: null - not_found",
191 ]
192},
193{
194 "id": 16,
195 "testCaseDescription": "test GetConfig String String String fail3",
196 "testFor": "getConfig",
197 "PDP_URLConfigFile": "config.properties"
198 "ECOMPName": "TestFail",
199 "ConfigName": "configFail",
200 "configAttributes": null,
201 "expectedResult":[
202 "Policy Name: null Policy version: null - not_found",
203 ]
204},
205{
206 "id": 17,
207 "testCaseDescription": "test GetConfig String String String fail4",
208 "testFor": "getConfig",
209 "PDP_URLConfigFile": "config.properties"
210 "ECOMPName": "TestFail",
211 "ConfigName": "configFail",
212 "configAttributes": [
213 {
214 "key": "",
215 "value": "",
216 },
217 ],
218 "expectedResult":[
219 "org.openecomp.policy.api.PolicyConfigException: Cannot have an empty Key",
220
221 ]
222},
223{
224 "id": 18,
225 "testCaseDescription": "test GetConfig String String String Valid",
226 "testFor": "getConfig",
227 "PDP_URLConfigFile": "config.properties"
228 "ECOMPName": "TestFail",
229 "ConfigName": "configFail",
230 "configAttributes": [
231 {
232 "key": "Action:com.test.fail",
233 "value": "Value",
234 },
235 ],
236 "expectedResult":[
237 "Policy Name: null Policy version: null - not_found",
238 ]
239},
240{
241 "id": 19,
242 "testCaseDescription": "test GetConfig String String String Valid JSON",
243 "testFor": "getConfig",
244 "PDP_URLConfigFile": "config.properties"
245 "ECOMPName": "JSON",
246 "ConfigName": "JSONconfig",
247 "configAttributes": [
248 {
249 "key": "Resource.com:test:resource:json",
250 "value":"Test",
251 },
252 {
253 "key": "Action.com:test:action:json",
254 "value":"TestJSON",
255 },
256 {
257 "key": "Subject.com:test:subject:json",
258 "value":"TestSubject",
259 }
260 ],
261 "expectedResult":[
262 "Policy Name: null Policy version: null - not_found",
263 ]
264},
265{
266 "id": 20,
267 "testCaseDescription": "test GetConfig String String String Valid XML",
268 "testFor": "getConfig",
269 "PDP_URLConfigFile": "config.properties"
270 "ECOMPName": "XML",
271 "ConfigName": "XMLconfig",
272 "configAttributes": [
273 {
274 "key": "Resource.com:test:resource:json",
275 "value":"Test",
276 },
277 {
278 "key": "Action.com:test:action:json",
279 "value":"TestJSON",
280 },
281 {
282 "key": "Subject.com:test:subject:json",
283 "value":"TestSubject",
284 }
285 ],
286 "expectedResult":[
287 "Policy Name: null Policy version: null - not_found",
288 ]
289},
290{
291 "id": 21,
292 "testCaseDescription": "test GetConfig String String String Valid properties",
293 "testFor": "getConfig",
294 "PDP_URLConfigFile": "config.properties"
295 "ECOMPName": "Properties",
296 "ConfigName": "PropConfig",
297 "configAttributes": [
298 {
299 "key": "Resource.com:test:resource:json",
300 "value":"Test",
301 },
302 {
303 "key": "Action.com:test:action:json",
304 "value":"TestJSON",
305 },
306 {
307 "key": "Subject.com:test:subject:json",
308 "value":"TestSubject",
309 }
310 ],
311 "expectedResult":[
312 "Policy Name: null Policy version: null - not_found",
313 ]
314},
315{
316 "id": 22,
317 "testCaseDescription": "test GetConfig String String String Valid other",
318 "testFor": "getConfig",
319 "PDP_URLConfigFile": "config.properties"
320 "ECOMPName": "Other",
321 "ConfigName": "OtherConfig",
322 "configAttributes": [
323 {
324 "key": "Resource.com:test:resource:json",
325 "value":"Test",
326 },
327 {
328 "key": "Action.com:test:action:json",
329 "value":"TestJSON",
330 },
331 {
332 "key": "Subject.com:test:subject:json",
333 "value":"TestSubject",
334 }
335 ],
336 "expectedResult":[
337 "Policy Name: null Policy version: null - not_found",
338 ]
339},
340{
341 "id": 23,
342 "testCaseDescription": "test SendEvent Fail",
343 "testFor": "getAction",
344 "PDP_URLConfigFile": "config.properties",
345 "eventAttributes": null,
346 "expectedResult":[
347 "org.openecomp.policy.api.PolicyEventException: No EventAttributes Given.",
348 ]
349},
350{
351 "id": 24,
352 "testCaseDescription": "test SendEvent Fail null",
353 "testFor": "getAction",
354 "PDP_URLConfigFile": "config.properties",
355 "eventAttributes": [
356 {
357 "key": "",
358 "value": ""
359 },
360 ],
361 "expectedResult":[
362 "org.openecomp.policy.api.PolicyEventException: Cannot have an empty Key",
363
364 ]
365},
366{
367 "id": 25,
368 "testCaseDescription": "test SendEvent Not Valid",
369 "testFor": "getAction",
370 "PDP_URLConfigFile": "config.properties",
371 "eventAttributes": [
372 {
373 "key": "Action.fail",
374 "value": "Value"
375 },
376 ],
377 "expectedResult":[
378 "Decision not a Permit. : no_action",
379 ]
380},
381{
382 "id": 26,
383 "testCaseDescription": "test SendEvent Action Advised",
384 "testFor": "getAction",
385 "PDP_URLConfigFile": "config.properties",
386 "eventAttributes": [
387 {
388 "key": "Key",
389 "value": "Value"
390 },
391 {
392 "key": "cpu",
393 "value": "80"
394 },
395 ],
396 "expectedResult":[
397 "Decision not a Permit. : no_action",
398 ]
399},
400{
401 "id": 27,
402 "testCaseDescription": "test SendEvent Action Taken",
403 "testFor": "getAction",
404 "PDP_URLConfigFile": "config.properties",
405 "eventAttributes": [
406 {
407 "key": "Key",
408 "value": "Value"
409 },
410 {
411 "key": "cpu",
412 "value": "91"
413 },
414 ],
415 "expectedResult":[
416 "Decision not a Permit. : no_action",
417 ]
418},
419]