From 579c4fe28e02885fbe7f16ffc1c23d6a3d4d1e01 Mon Sep 17 00:00:00 2001 From: mariegallardo Date: Mon, 10 Jul 2017 17:04:19 +0200 Subject: [PATCH] Host group services postman tests updated (#5425) * Host group services postman tests updated * Error cleaned --- .../rest_api/rest_api.postman_collection.json | 248 ++++++++++++++++++ .../rest_api.postman_environment.json | 24 ++ 2 files changed, 272 insertions(+) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 8cdb113c48e..3148c2f9f5e 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -35427,6 +35427,130 @@ }, "response": [] }, + { + "name": "Setparam contact_additive_inheritance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, { "name": "Setparam notifications_enabled", "event": [ @@ -39608,6 +39732,130 @@ }, "response": [] }, + { + "name": "Setparam contact_additive_inheritance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, { "name": "Setparam notifications_enabled", "event": [ diff --git a/tests/rest_api/rest_api.postman_environment.json b/tests/rest_api/rest_api.postman_environment.json index fbf2f7bcdf4..515e4517c8c 100644 --- a/tests/rest_api/rest_api.postman_environment.json +++ b/tests/rest_api/rest_api.postman_environment.json @@ -3085,6 +3085,30 @@ "key": "mib_path", "value": "/usr/share/centreon/IF-MIB.txt", "type": "text" + }, + { + "enabled": true, + "key": "service_contact_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "service_cg_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "hgservice_contact_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "hgservice_cg_additive_inheritance", + "value": "1", + "type": "text" } ], "timestamp": 1497354245340,