Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datadog_sync/utils/resource_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def give_up_diffing(self, level, diff_instance) -> bool:
return False


RECURRENCE_START_ATTR_PATH_RE = r"root\['attributes'\]\['schedule'\]\['recurrences'\]\[[0-9]+\]\['start'\]"
RECURRENCE_START_ATTR_PATH_RE = r"root\['attributes'\]\['schedule'\](?:\['recurrences'\]\[[0-9]+\])?\['start'\]"


class DowntimeSchedulesDateOperator(BaseOperator):
Expand Down
8 changes: 8 additions & 0 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def test_resource_import(self, runner, caplog):
source_resources, _ = open_resources(self.resource_type)
assert len(source_resources) > 0

# Clear caplog so import-phase skip messages don't leak into the diffs
# assertion below (e.g. canceled downtimes skipped during import).
caplog.clear()

# Disable skipping on resource connection failure
# From stdout, count the number of resources to be added and ensure they match the import len()
diff_cmd = [
Expand Down Expand Up @@ -414,6 +418,10 @@ def test_resource_import_per_file(self, runner, caplog):
":", "."
), f"Resource with ID {resource_id} should have a file with {file_id}"

# Clear caplog so import-phase skip messages don't leak into the diffs
# assertion below (e.g. canceled downtimes skipped during import).
caplog.clear()

# Run diffs to ensure everything is recognized properly
ret = runner.invoke(
cli,
Expand Down
Loading