From 5878970a5d01027ba89472e491a9e1d26528b79d Mon Sep 17 00:00:00 2001 From: Malak El Kouri Date: Fri, 17 Apr 2026 13:51:42 +0200 Subject: [PATCH 1/7] Adapt sync-cli to support synthetics PLs replication for DDR --- datadog_sync/commands/shared/options.py | 7 +++ datadog_sync/constants.py | 1 + .../model/synthetics_private_locations.py | 63 +++++++++++++++++-- datadog_sync/utils/configuration.py | 3 + 4 files changed, 69 insertions(+), 5 deletions(-) diff --git a/datadog_sync/commands/shared/options.py b/datadog_sync/commands/shared/options.py index 34eb7927e..2a551d643 100644 --- a/datadog_sync/commands/shared/options.py +++ b/datadog_sync/commands/shared/options.py @@ -244,6 +244,13 @@ def click_config_file_provider(ctx: Context, opts: CustomOptionClass, value: Non "Disables progress bar.", cls=CustomOptionClass, ), + option( + "--datadog-host-override", + envvar=constants.DD_DATADOG_HOST_OVERRIDE, + required=False, + help="Optional CNAME override for the Datadog host used in DDR private location replication.", + cls=CustomOptionClass, + ), ] _storage_options = [ diff --git a/datadog_sync/constants.py b/datadog_sync/constants.py index 90297938f..61b450f94 100644 --- a/datadog_sync/constants.py +++ b/datadog_sync/constants.py @@ -27,6 +27,7 @@ DD_VERIFY_SSL_CERTIFICATES = "DD_VERIFY_SSL_CERTIFICATES" DD_ALLOW_PARTIAL_PERMISSIONS_ROLES = "DD_ALLOW_PARTIAL_PERMISSIONS_ROLES" DD_SYNC_JSON = "DD_SYNC_JSON" +DD_DATADOG_HOST_OVERRIDE = "DD_DATADOG_HOST_OVERRIDE" LOCAL_STORAGE_TYPE = "local" S3_STORAGE_TYPE = "s3" diff --git a/datadog_sync/model/synthetics_private_locations.py b/datadog_sync/model/synthetics_private_locations.py index 1f7d3ed1a..14cd12425 100644 --- a/datadog_sync/model/synthetics_private_locations.py +++ b/datadog_sync/model/synthetics_private_locations.py @@ -4,6 +4,8 @@ # Copyright 2019 Datadog, Inc. from __future__ import annotations +import json +import os import re from typing import TYPE_CHECKING, List, Dict, Optional, Tuple @@ -14,6 +16,9 @@ if TYPE_CHECKING: from datadog_sync.utils.custom_client import CustomClient +# Fields returned by include_pl_info=true that should not be stored in source state +_PL_INFO_FIELDS = ["pl_id", "org_id", "datacenter", "public_key_test", "public_key_result"] + class SyntheticsPrivateLocations(BaseResource): resource_type = "synthetics_private_locations" @@ -28,6 +33,7 @@ class SyntheticsPrivateLocations(BaseResource): "secrets", "config", "result_encryption", + "ddr_metadata", ], tagging_config=TaggingConfig(path="tags"), ) @@ -35,6 +41,11 @@ class SyntheticsPrivateLocations(BaseResource): base_locations_path: str = "/api/v1/synthetics/locations" pl_id_regex: re.Pattern = re.compile("^pl:.*") + def __init__(self, config): + super().__init__(config) + # In-memory store for include_pl_info data, keyed by source PL ID + self._pl_info: Dict[str, Dict] = {} + async def get_resources(self, client: CustomClient) -> List[Dict]: resp = await client.get(self.base_locations_path) @@ -47,10 +58,21 @@ async def import_resource(self, _id: Optional[str] = None, resource: Optional[Di if not self.pl_id_regex.match(import_id): raise SkipResource(import_id, self.resource_type, "Managed location.") - pl = await source_client.get(self.resource_config.base_path + f"/{import_id}") - self.config.state.source[self.resource_type][import_id] = pl + resp = await source_client.get( + self.resource_config.base_path + f"/{import_id}", + params={"include_pl_info": "true"}, + ) + + # Extract pl_info fields for use during create, keep source state clean + pl_info = {} + for field in _PL_INFO_FIELDS: + if field in resp: + pl_info[field] = resp.pop(field) + self._pl_info[import_id] = pl_info + + self.config.state.source[self.resource_type][import_id] = resp - return import_id, pl + return import_id, resp async def pre_resource_action_hook(self, _id, resource: Dict) -> None: pass @@ -60,12 +82,32 @@ async def pre_apply_hook(self) -> None: async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: destination_client = self.config.destination_client + pl_info = self._pl_info.get(_id, {}) + + resource["ddr_metadata"] = { + "disaster_recovery": { + "source_pl_id": pl_info["pl_id"], + "source_name": _id, + "source_dc": pl_info["datacenter"], + "source_org_id": pl_info["org_id"], + } + } + resource["test_encryption_public_key"] = pl_info["public_key_test"] + resource["result_encryption_public_key"] = pl_info["public_key_result"] + if self.config.datadog_host_override: + resource["datadog_host_override"] = self.config.datadog_host_override resp = await destination_client.post(self.resource_config.base_path, resource) + # DDR response: {"private_location": {...}, "publicKeysByMainDC": {...}} pl = resp["private_location"] - pl["config"] = resp.get("config") - pl["result_encryption"] = resp.get("result_encryption") + + # Save PL config to file for later use running the PL + pl_config = { + "publicKeysByMainDC": resp.get("publicKeysByMainDC"), + "datadogHostOverride": self.config.datadog_host_override, + } + self._save_pl_config(pl.get("name", _id), pl_config) return _id, pl @@ -88,3 +130,14 @@ async def delete_resource(self, _id: str) -> None: def connect_id(self, key: str, r_obj: Dict, resource_to_connect: str) -> Optional[List[str]]: return super(SyntheticsPrivateLocations, self).connect_id(key, r_obj, resource_to_connect) + + def _save_pl_config(self, pl_name: str, config: Dict) -> None: + destination_path = self.config.state._storage.destination_resources_path + config_dir = os.path.join(destination_path, "synthetics_private_locations_config") + os.makedirs(config_dir, exist_ok=True) + + sanitized_name = re.sub(r"[^\w\-]", "_", pl_name) + config_file = os.path.join(config_dir, f"{sanitized_name}.json") + + with open(config_file, "w", encoding="utf-8") as f: + json.dump(config, f, indent=2) diff --git a/datadog_sync/utils/configuration.py b/datadog_sync/utils/configuration.py index e5bbd99de..e9d9ac02c 100644 --- a/datadog_sync/utils/configuration.py +++ b/datadog_sync/utils/configuration.py @@ -66,6 +66,7 @@ class Configuration(object): backup_before_reset: bool show_progress_bar: bool allow_self_lockout: bool + datadog_host_override: Optional[str] = None emit_json: bool = False command: str = "" allow_partial_permissions_roles: List[str] = field(default_factory=list) @@ -208,6 +209,7 @@ def build_config(cmd: Command, **kwargs: Optional[Any]) -> Configuration: if emit_json: show_progress_bar = False allow_self_lockout = kwargs.get("allow_self_lockout", False) + datadog_host_override = kwargs.get("datadog_host_override") # Parse allow_partial_permissions_roles allow_partial_permissions_roles = [] @@ -334,6 +336,7 @@ def build_config(cmd: Command, **kwargs: Optional[Any]) -> Configuration: backup_before_reset=backup_before_reset, show_progress_bar=show_progress_bar, allow_self_lockout=allow_self_lockout, + datadog_host_override=datadog_host_override, emit_json=emit_json, command=cmd.value, allow_partial_permissions_roles=allow_partial_permissions_roles, From d9e4212916fb6f778c233c41129ec4fddafb3e47 Mon Sep 17 00:00:00 2001 From: Malak El Kouri Date: Fri, 17 Apr 2026 15:31:53 +0200 Subject: [PATCH 2/7] fix datadogHostOverride --- .../model/synthetics_private_locations.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/datadog_sync/model/synthetics_private_locations.py b/datadog_sync/model/synthetics_private_locations.py index 14cd12425..8e0dc928e 100644 --- a/datadog_sync/model/synthetics_private_locations.py +++ b/datadog_sync/model/synthetics_private_locations.py @@ -16,10 +16,6 @@ if TYPE_CHECKING: from datadog_sync.utils.custom_client import CustomClient -# Fields returned by include_pl_info=true that should not be stored in source state -_PL_INFO_FIELDS = ["pl_id", "org_id", "datacenter", "public_key_test", "public_key_result"] - - class SyntheticsPrivateLocations(BaseResource): resource_type = "synthetics_private_locations" resource_config = ResourceConfig( @@ -41,11 +37,6 @@ class SyntheticsPrivateLocations(BaseResource): base_locations_path: str = "/api/v1/synthetics/locations" pl_id_regex: re.Pattern = re.compile("^pl:.*") - def __init__(self, config): - super().__init__(config) - # In-memory store for include_pl_info data, keyed by source PL ID - self._pl_info: Dict[str, Dict] = {} - async def get_resources(self, client: CustomClient) -> List[Dict]: resp = await client.get(self.base_locations_path) @@ -60,16 +51,8 @@ async def import_resource(self, _id: Optional[str] = None, resource: Optional[Di resp = await source_client.get( self.resource_config.base_path + f"/{import_id}", - params={"include_pl_info": "true"}, ) - # Extract pl_info fields for use during create, keep source state clean - pl_info = {} - for field in _PL_INFO_FIELDS: - if field in resp: - pl_info[field] = resp.pop(field) - self._pl_info[import_id] = pl_info - self.config.state.source[self.resource_type][import_id] = resp return import_id, resp @@ -82,7 +65,17 @@ async def pre_apply_hook(self) -> None: async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: destination_client = self.config.destination_client - pl_info = self._pl_info.get(_id, {}) + source_client = self.config.source_client + + # Fetch pl_info from source API for DDR metadata + pl_info = await source_client.get( + self.resource_config.base_path + f"/{_id}", + params={"include_pl_info": "true"}, + ) + + # Strip null metadata — DDR endpoint requires it to be an object + if resource.get("metadata") is None: + resource.pop("metadata", None) resource["ddr_metadata"] = { "disaster_recovery": { @@ -92,8 +85,14 @@ async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: "source_org_id": pl_info["org_id"], } } - resource["test_encryption_public_key"] = pl_info["public_key_test"] - resource["result_encryption_public_key"] = pl_info["public_key_result"] + # test_encryption_public_key expects the JSON-stringified public_key_test object + resource["test_encryption_public_key"] = json.dumps(pl_info["public_key_test"]) + # result_encryption_public_key expects {"pem": ..., "fingerprint": ...} + pub_key_result = pl_info["public_key_result"] + resource["result_encryption_public_key"] = { + "pem": pub_key_result["key"], + "fingerprint": pub_key_result["id"], + } if self.config.datadog_host_override: resource["datadog_host_override"] = self.config.datadog_host_override @@ -105,8 +104,9 @@ async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: # Save PL config to file for later use running the PL pl_config = { "publicKeysByMainDC": resp.get("publicKeysByMainDC"), - "datadogHostOverride": self.config.datadog_host_override, } + if self.config.datadog_host_override: + pl_config["datadogHostOverride"] = self.config.datadog_host_override self._save_pl_config(pl.get("name", _id), pl_config) return _id, pl From 4d4cda3a823ff1974e3dca215e389b50083a2c8f Mon Sep 17 00:00:00 2001 From: Malak El Kouri Date: Wed, 22 Apr 2026 10:20:35 +0200 Subject: [PATCH 3/7] fix reset --- datadog_sync/utils/resources_handler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/datadog_sync/utils/resources_handler.py b/datadog_sync/utils/resources_handler.py index 07930cb63..a9695d693 100644 --- a/datadog_sync/utils/resources_handler.py +++ b/datadog_sync/utils/resources_handler.py @@ -81,6 +81,9 @@ async def init_async(self) -> None: self.worker: Workers = Workers(self.config) async def reset(self) -> None: + # Save existing destination state — only contains resources managed by sync-cli + managed_destination = self.config.state._data.destination + if self.config.backup_before_reset: await self.import_resources() else: @@ -89,8 +92,9 @@ async def reset(self) -> None: sleep(5) await self.import_resources_without_saving() - # move the import data from source to destination - self.config.state._data.destination = self.config.state._data.source + # Restore the original destination state so only managed resources are deleted, + # not all resources fetched from the destination API during backup. + self.config.state._data.destination = managed_destination for resource_type in self.config.resources_arg: resources = {} From c76f24a3fd73d7fc25bb6d6d88e39327829532a7 Mon Sep 17 00:00:00 2001 From: Malak EL KOURI Date: Wed, 27 May 2026 13:25:13 +0200 Subject: [PATCH 4/7] use new PL endpoints --- .../model/synthetics_private_locations.py | 52 +++---------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/datadog_sync/model/synthetics_private_locations.py b/datadog_sync/model/synthetics_private_locations.py index 8e0dc928e..6efc89bce 100644 --- a/datadog_sync/model/synthetics_private_locations.py +++ b/datadog_sync/model/synthetics_private_locations.py @@ -5,7 +5,6 @@ from __future__ import annotations import json -import os import re from typing import TYPE_CHECKING, List, Dict, Optional, Tuple @@ -28,8 +27,9 @@ class SyntheticsPrivateLocations(BaseResource): "createdBy", "secrets", "config", - "result_encryption", "ddr_metadata", + "pl_id", + "public_key_test", ], tagging_config=TaggingConfig(path="tags"), ) @@ -51,6 +51,7 @@ async def import_resource(self, _id: Optional[str] = None, resource: Optional[Di resp = await source_client.get( self.resource_config.base_path + f"/{import_id}", + params={"include_pl_info": "true"}, ) self.config.state.source[self.resource_type][import_id] = resp @@ -65,51 +66,23 @@ async def pre_apply_hook(self) -> None: async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: destination_client = self.config.destination_client - source_client = self.config.source_client + source_pl = self.config.state.source[self.resource_type][_id] - # Fetch pl_info from source API for DDR metadata - pl_info = await source_client.get( - self.resource_config.base_path + f"/{_id}", - params={"include_pl_info": "true"}, - ) - - # Strip null metadata — DDR endpoint requires it to be an object if resource.get("metadata") is None: resource.pop("metadata", None) resource["ddr_metadata"] = { "disaster_recovery": { - "source_pl_id": pl_info["pl_id"], + "source_pl_id": source_pl["pl_id"], "source_name": _id, - "source_dc": pl_info["datacenter"], - "source_org_id": pl_info["org_id"], } } - # test_encryption_public_key expects the JSON-stringified public_key_test object - resource["test_encryption_public_key"] = json.dumps(pl_info["public_key_test"]) - # result_encryption_public_key expects {"pem": ..., "fingerprint": ...} - pub_key_result = pl_info["public_key_result"] - resource["result_encryption_public_key"] = { - "pem": pub_key_result["key"], - "fingerprint": pub_key_result["id"], - } + resource["test_encryption_public_key"] = json.dumps(source_pl["public_key_test"]) if self.config.datadog_host_override: resource["datadog_host_override"] = self.config.datadog_host_override resp = await destination_client.post(self.resource_config.base_path, resource) - - # DDR response: {"private_location": {...}, "publicKeysByMainDC": {...}} - pl = resp["private_location"] - - # Save PL config to file for later use running the PL - pl_config = { - "publicKeysByMainDC": resp.get("publicKeysByMainDC"), - } - if self.config.datadog_host_override: - pl_config["datadogHostOverride"] = self.config.datadog_host_override - self._save_pl_config(pl.get("name", _id), pl_config) - - return _id, pl + return _id, resp["private_location"] async def update_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: destination_client = self.config.destination_client @@ -130,14 +103,3 @@ async def delete_resource(self, _id: str) -> None: def connect_id(self, key: str, r_obj: Dict, resource_to_connect: str) -> Optional[List[str]]: return super(SyntheticsPrivateLocations, self).connect_id(key, r_obj, resource_to_connect) - - def _save_pl_config(self, pl_name: str, config: Dict) -> None: - destination_path = self.config.state._storage.destination_resources_path - config_dir = os.path.join(destination_path, "synthetics_private_locations_config") - os.makedirs(config_dir, exist_ok=True) - - sanitized_name = re.sub(r"[^\w\-]", "_", pl_name) - config_file = os.path.join(config_dir, f"{sanitized_name}.json") - - with open(config_file, "w", encoding="utf-8") as f: - json.dump(config, f, indent=2) From a8dc5f46d6ea107262bac5b72e605c582639deaa Mon Sep 17 00:00:00 2001 From: Malak EL KOURI Date: Wed, 3 Jun 2026 11:35:22 +0200 Subject: [PATCH 5/7] feat(synthetics_tests): migrate to map_existing_resources for cross-run dedup Previously synthetics_tests had skip_resource_mapping=True, so the sync had no way to detect a destination test that already existed when state didn't know about it. Under degraded destination APIs (504/5xx storms during McNulty pool exhaustion on staging), repeated sync runs were accumulating duplicate tests in R2: a prior sync's POST succeeded server-side, the client exhausted retries and never persisted the destination id, and the next sync's create branch POSTed again. This migration: - Replaces skip_resource_mapping with resource_mapping_key="metadata.disaster_recovery.source_public_id", the stamp pre_resource_action_hook already writes on every source test before create/update. - Adds a map_existing_resources() override that LISTs destination tests with include_metadata=true and indexes them by source_public_id, without the destination-versions side-effect that get_resources has. - Adds a short-circuit at the top of create_resource: if R2 already has a test stamped with this source_public_id, adopt it into state and call update_resource instead of POSTing a new copy. This does not address in-POST retry duplications (those happen mid-POST, after the existing_resources_map is built and frozen). Operational mitigation for staging-degraded conditions: --max-workers 20 --http-client-retry-timeout 180 Co-Authored-By: Claude Opus 4.7 (1M context) --- datadog_sync/model/synthetics_tests.py | 21 ++++++++++++++++++++- tests/unit/test_map_existing_resources.py | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/datadog_sync/model/synthetics_tests.py b/datadog_sync/model/synthetics_tests.py index ff8ed07fd..163fd3004 100644 --- a/datadog_sync/model/synthetics_tests.py +++ b/datadog_sync/model/synthetics_tests.py @@ -80,7 +80,7 @@ class SyntheticsTests(BaseResource): "steps": [[]], }, tagging_config=TaggingConfig(path="tags"), - skip_resource_mapping=True, + resource_mapping_key="metadata.disaster_recovery.source_public_id", ) # Additional SyntheticsTests specific attributes browser_test_path: str = "/api/v1/synthetics/tests/browser/{}" @@ -153,6 +153,17 @@ async def get_resources(self, client: CustomClient) -> List[Dict]: self.versions = await versions.get_resources(client) return resp["tests"] + async def map_existing_resources(self) -> None: + resp = await self.config.destination_client.get( + self.resource_config.base_path, + params=self.get_params, + ) + self._existing_resources_map = {} + for resource in resp["tests"]: + key = self.get_resource_mapping_key(resource) + if key is not None: + self._existing_resources_map[key] = resource + async def import_resource(self, _id: Optional[str] = None, resource: Optional[Dict] = None) -> Tuple[str, Dict]: source_client = self.config.source_client if _id: @@ -322,6 +333,14 @@ async def create_resource(self, _id: str, resource: Dict) -> Tuple[str, Dict]: test_type = resource["type"] resource.pop("mobileApplicationsVersions", None) + # If a destination test already carries this source_public_id, adopt it into + # state and update, this prevents duplicate orphans when a prior sync's POST succeeded + # server-side but the client saw a 5xx and never persisted the destination id. + existing_key = self.get_resource_mapping_key(resource) + if existing_key and existing_key in self._existing_resources_map: + self.config.state.destination[self.resource_type][_id] = self._existing_resources_map[existing_key] + return await self.update_resource(_id, resource) + # Force status to "paused" for new tests to prevent immediate execution # on destination during failover scenarios. Status can be manually changed after creation. resource["status"] = "paused" diff --git a/tests/unit/test_map_existing_resources.py b/tests/unit/test_map_existing_resources.py index 8657de527..119d6290c 100644 --- a/tests/unit/test_map_existing_resources.py +++ b/tests/unit/test_map_existing_resources.py @@ -55,14 +55,14 @@ "synthetics_mobile_applications_versions", "synthetics_private_locations", "synthetics_test_suites", - "synthetics_tests", ] -# The 9 resources that use resource mapping +# The 10 resources that use resource mapping MAPPING_RESOURCES = [ "users", "teams", "synthetics_global_variables", + "synthetics_tests", "logs_indexes", "logs_metrics", "metric_tag_configurations", From d0365bcd798fc10a8466eeb0ac132b526c7cbd21 Mon Sep 17 00:00:00 2001 From: Malak EL KOURI Date: Thu, 4 Jun 2026 10:42:55 +0200 Subject: [PATCH 6/7] Revert reset() to default destination-overwrite behavior Per reviewer feedback (Michael Richey, Ron Hay): the "delete only sync-cli- managed resources" change to reset is a broader semantic discussion that deserves its own PR and possibly its own command name. Moving the behavior change out of this PR so the DDR PL replication can be reviewed in isolation. The discussion will continue in a follow-up PR. Co-Authored-By: Claude Opus 4.7 (1M context) --- datadog_sync/utils/resources_handler.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/datadog_sync/utils/resources_handler.py b/datadog_sync/utils/resources_handler.py index e9bab037c..3c2044b82 100644 --- a/datadog_sync/utils/resources_handler.py +++ b/datadog_sync/utils/resources_handler.py @@ -149,9 +149,6 @@ async def init_async(self) -> None: self.worker: Workers = Workers(self.config) async def reset(self) -> None: - # Save existing destination state — only contains resources managed by sync-cli - managed_destination = self.config.state._data.destination - if self.config.backup_before_reset: await self.import_resources() else: @@ -160,9 +157,8 @@ async def reset(self) -> None: sleep(5) await self.import_resources_without_saving() - # Restore the original destination state so only managed resources are deleted, - # not all resources fetched from the destination API during backup. - self.config.state._data.destination = managed_destination + # move the import data from source to destination + self.config.state._data.destination = self.config.state._data.source for resource_type in self.config.resources_arg: resources = {} From 03b24e4896a766340f9e09d1a6a7a2fb962da680 Mon Sep 17 00:00:00 2001 From: Malak EL KOURI Date: Thu, 4 Jun 2026 16:28:48 +0200 Subject: [PATCH 7/7] test: update VCR cassettes for DDR PL endpoint changes - PL cassettes (test_synthetics_private_locations and test_cli): * Append ?include_pl_info=true to source PL GET URLs. * Add pl_id + public_key_test to GET responses (consumed by create_resource for ddr_metadata + test_encryption_public_key). * Update POST bodies to include ddr_metadata.disaster_recovery and test_encryption_public_key as JSON-stringified payload. - synthetics_tests cassettes: pre-pend recorded GET LIST interactions against the destination for the new map_existing_resources call, with empty {"tests": []} response (no orphans to dedupe in the test scenario). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../test_cli/TestCli.test_cleanup.yaml | 160 +++++++++++++++++ .../test_cli/TestCli.test_import.yaml | 164 ++++++++++++++++- ...test_import_without_verify_ddr_status.yaml | 164 ++++++++++++++++- .../test_cli/TestCli.test_migrate.yaml | 168 +++++++++++++++++- ...est_migrate_without_verify_ddr_status.yaml | 168 +++++++++++++++++- .../cassettes/test_cli/TestCli.test_sync.yaml | 164 ++++++++++++++++- ...i.test_sync_without_verify_ddr_status.yaml | 164 ++++++++++++++++- ...cationsResources.test_resource_import.yaml | 6 +- ...sources.test_resource_import_per_file.yaml | 4 +- ...LocationsResources.test_resource_sync.yaml | 8 +- ...Resources.test_resource_sync_per_file.yaml | 8 +- ...nsResources.test_resource_update_sync.yaml | 8 +- ...es.test_resource_update_sync_per_file.yaml | 8 +- ...csTestsResources.test_resource_import.yaml | 160 +++++++++++++++++ ...sources.test_resource_import_per_file.yaml | 160 +++++++++++++++++ ...ticsTestsResources.test_resource_sync.yaml | 160 +++++++++++++++++ ...Resources.test_resource_sync_per_file.yaml | 160 +++++++++++++++++ ...tsResources.test_resource_update_sync.yaml | 160 +++++++++++++++++ ...es.test_resource_update_sync_per_file.yaml | 160 +++++++++++++++++ 19 files changed, 2126 insertions(+), 28 deletions(-) diff --git a/tests/integration/cassettes/test_cli/TestCli.test_cleanup.yaml b/tests/integration/cassettes/test_cli/TestCli.test_cleanup.yaml index aa17459c0..19705dbf9 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_cleanup.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_cleanup.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/cassettes/test_cli/TestCli.test_import.yaml b/tests/integration/cassettes/test_cli/TestCli.test_import.yaml index c3d11cc1a..a807ecd6f 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_import.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_import.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -6121,13 +6281,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json diff --git a/tests/integration/cassettes/test_cli/TestCli.test_import_without_verify_ddr_status.yaml b/tests/integration/cassettes/test_cli/TestCli.test_import_without_verify_ddr_status.yaml index a91635675..e0c06388e 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_import_without_verify_ddr_status.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_import_without_verify_ddr_status.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -10650,13 +10810,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json diff --git a/tests/integration/cassettes/test_cli/TestCli.test_migrate.yaml b/tests/integration/cassettes/test_cli/TestCli.test_migrate.yaml index 74a27f3a3..91421dc25 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_migrate.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_migrate.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -9183,13 +9343,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -17652,7 +17812,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/cassettes/test_cli/TestCli.test_migrate_without_verify_ddr_status.yaml b/tests/integration/cassettes/test_cli/TestCli.test_migrate_without_verify_ddr_status.yaml index 1badfadfa..ea9b33b44 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_migrate_without_verify_ddr_status.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_migrate_without_verify_ddr_status.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -3484,13 +3644,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -17899,7 +18059,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/cassettes/test_cli/TestCli.test_sync.yaml b/tests/integration/cassettes/test_cli/TestCli.test_sync.yaml index be385c1d0..03cde8111 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_sync.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_sync.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -7582,7 +7742,9 @@ interactions: message: Accepted - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/cassettes/test_cli/TestCli.test_sync_without_verify_ddr_status.yaml b/tests/integration/cassettes/test_cli/TestCli.test_sync_without_verify_ddr_status.yaml index d29d1b7e7..3fa59d1f8 100644 --- a/tests/integration/cassettes/test_cli/TestCli.test_sync_without_verify_ddr_status.yaml +++ b/tests/integration/cassettes/test_cli/TestCli.test_sync_without_verify_ddr_status.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: @@ -7208,7 +7368,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import.yaml index 6afb474b4..ff14b1f0e 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import.yaml @@ -40,13 +40,15 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": + {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": + "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import_per_file.yaml index 2fc7f9e47..f7e849bbc 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_import_per_file.yaml @@ -60,13 +60,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync.yaml index 134269bc5..582a58d84 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync.yaml @@ -40,13 +40,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -55,7 +55,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync_per_file.yaml index 3b3f8808b..544bfdfb1 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_sync_per_file.yaml @@ -60,13 +60,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -95,7 +95,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync.yaml index a6050d39f..5b3678e80 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync.yaml @@ -40,13 +40,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -55,7 +55,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync_per_file.yaml index 089b017b3..a8a964b32 100644 --- a/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_private_locations/TestSyntheticsPrivateLocationsResources.test_resource_update_sync_per_file.yaml @@ -60,13 +60,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42 + uri: https://api.datadoghq.eu/api/v1/synthetics/private-locations/pl:test-ddd684741691962f1bfdebeef3963a42?include_pl_info=true response: body: string: '{"createdAt": "2024-10-28T18:55:32.131820+00:00", "modifiedAt": "2024-10-28T18:55:32.131820+00:00", "description": "test", "tags": ["team:test"], "name": "test", "metadata": {"restricted_roles": []}, "id": "pl:test-ddd684741691962f1bfdebeef3963a42", - "createdBy": "michael.richey@datadoghq.com"}' + "createdBy": "michael.richey@datadoghq.com", "pl_id": 12345, "public_key_test": {"pem": "-----BEGIN PUBLIC KEY-----\nfake\n-----END PUBLIC KEY-----", "fingerprint": "sha256$base64$fakefingerprint=", "id": "test-key-id"}}' headers: Content-Type: - application/json @@ -95,7 +95,9 @@ interactions: message: OK - request: body: '{"description": "test", "tags": ["team:test", "managed_by:datadog-sync"], - "name": "test", "metadata": {"restricted_roles": []}}' + "name": "test", "metadata": {"restricted_roles": []}, "ddr_metadata": {"disaster_recovery": + {"source_pl_id": 12345, "source_name": "pl:test-ddd684741691962f1bfdebeef3963a42"}}, + "test_encryption_public_key": "{\"pem\": \"-----BEGIN PUBLIC KEY-----\\nfake\\n-----END PUBLIC KEY-----\", \"fingerprint\": \"sha256$base64$fakefingerprint=\", \"id\": \"test-key-id\"}"}' headers: Content-Type: - application/json diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import.yaml index 235ad431c..e4090a81e 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import_per_file.yaml index 7408655e5..db11af3f9 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_import_per_file.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync.yaml index fecabc774..4541340b5 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync_per_file.yaml index 1c9a8811c..297b1d2ca 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_sync_per_file.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync.yaml index dab592679..8e7ad57f4 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: diff --git a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync_per_file.yaml b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync_per_file.yaml index e5efd4f60..d20bf24ff 100644 --- a/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync_per_file.yaml +++ b/tests/integration/resources/cassettes/test_synthetics_tests/TestSyntheticsTestsResources.test_resource_update_sync_per_file.yaml @@ -1,4 +1,164 @@ interactions: +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + Content-Type: + - application/json + method: GET + uri: https://api.us5.datadoghq.com/api/v1/synthetics/tests?include_metadata=true + response: + body: + string: '{"tests": []}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK - request: body: null headers: