|
| 1 | +@endpoint(fleet-automation) @endpoint(fleet-automation-v2) |
| 2 | +Feature: Fleet Automation |
| 3 | + Manage fleet automation update configurations for remote config products. |
| 4 | + |
| 5 | + Background: |
| 6 | + Given a valid "apiKeyAuth" key in the system |
| 7 | + And a valid "appKeyAuth" key in the system |
| 8 | + And an instance of "FleetAutomation" API |
| 9 | + |
| 10 | + @generated @skip @team:DataDog/fleet-automation |
| 11 | + Scenario: Cancel an update config returns "Bad Request" response |
| 12 | + Given operation "CancelUpdateConfig" enabled |
| 13 | + And new "CancelUpdateConfig" request |
| 14 | + And request contains "update_config_id" parameter from "REPLACE.ME" |
| 15 | + When the request is sent |
| 16 | + Then the response status is 400 Bad Request |
| 17 | + |
| 18 | + @generated @skip @team:DataDog/fleet-automation |
| 19 | + Scenario: Cancel an update config returns "NO CONTENT" response |
| 20 | + Given operation "CancelUpdateConfig" enabled |
| 21 | + And new "CancelUpdateConfig" request |
| 22 | + And request contains "update_config_id" parameter from "REPLACE.ME" |
| 23 | + When the request is sent |
| 24 | + Then the response status is 204 NO CONTENT |
| 25 | + |
| 26 | + @generated @skip @team:DataDog/fleet-automation |
| 27 | + Scenario: Cancel an update config returns "Not Found" response |
| 28 | + Given operation "CancelUpdateConfig" enabled |
| 29 | + And new "CancelUpdateConfig" request |
| 30 | + And request contains "update_config_id" parameter from "REPLACE.ME" |
| 31 | + When the request is sent |
| 32 | + Then the response status is 404 Not Found |
| 33 | + |
| 34 | + @generated @skip @team:DataDog/fleet-automation |
| 35 | + Scenario: Create an update config returns "Bad Request" response |
| 36 | + Given operation "CreateUpdateConfig" enabled |
| 37 | + And new "CreateUpdateConfig" request |
| 38 | + And body with value {"data": {"attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/etc/datadog-agent/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "update_config"}} |
| 39 | + When the request is sent |
| 40 | + Then the response status is 400 Bad Request |
| 41 | + |
| 42 | + @skip @team:DataDog/fleet-automation |
| 43 | + Scenario: Create an update config returns "CREATED" response |
| 44 | + Given operation "CreateUpdateConfig" enabled |
| 45 | + And new "CreateUpdateConfig" request |
| 46 | + And body with value {"data": {"id": "abcdefg", "attributes": {"config_operations": [{"file_op": "merge-patch", "file_path": "/etc/datadog-agent/datadog.yaml", "patch": {"apm_config": {"enabled": true}, "log_level": "debug", "logs_enabled": true}}], "filter_query": "env:prod AND service:web"}, "type": "update_config"}} |
| 47 | + When the request is sent |
| 48 | + Then the response status is 201 CREATED |
| 49 | + |
| 50 | + @generated @skip @team:DataDog/fleet-automation |
| 51 | + Scenario: Get all update configs returns "Bad Request" response |
| 52 | + Given operation "ListUpdateConfigs" enabled |
| 53 | + And new "ListUpdateConfigs" request |
| 54 | + When the request is sent |
| 55 | + Then the response status is 400 Bad Request |
| 56 | + |
| 57 | + @generated @skip @team:DataDog/fleet-automation |
| 58 | + Scenario: Get all update configs returns "OK" response |
| 59 | + Given operation "ListUpdateConfigs" enabled |
| 60 | + And new "ListUpdateConfigs" request |
| 61 | + When the request is sent |
| 62 | + Then the response status is 200 OK |
| 63 | + |
| 64 | + @generated @skip @team:DataDog/fleet-automation |
| 65 | + Scenario: Get an update config returns "Bad Request" response |
| 66 | + Given operation "GetUpdateConfig" enabled |
| 67 | + And new "GetUpdateConfig" request |
| 68 | + And request contains "update_config_id" parameter from "REPLACE.ME" |
| 69 | + When the request is sent |
| 70 | + Then the response status is 400 Bad Request |
| 71 | + |
| 72 | + @generated @skip @team:DataDog/fleet-automation |
| 73 | + Scenario: Get an update config returns "Not Found" response |
| 74 | + Given operation "GetUpdateConfig" enabled |
| 75 | + And new "GetUpdateConfig" request |
| 76 | + And request contains "update_config_id" parameter from "REPLACE.ME" |
| 77 | + When the request is sent |
| 78 | + Then the response status is 404 Not Found |
| 79 | + |
| 80 | + @skip @team:DataDog/fleet-automation |
| 81 | + Scenario: Get an update config returns "OK" response |
| 82 | + Given operation "GetUpdateConfig" enabled |
| 83 | + And new "GetUpdateConfig" request |
| 84 | + And there is a valid "update_config" in the system |
| 85 | + And request contains "update_config_id" parameter from "update_config.id" |
| 86 | + When the request is sent |
| 87 | + Then the response status is 200 OK |
0 commit comments