Skip to content

Commit 43436b9

Browse files
committed
stab
1 parent a0cf80f commit 43436b9

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

velero/tests/test_e2e.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55

66
from datadog_checks.base.constants import ServiceCheck
7+
from datadog_checks.dev.docker import CONTAINER_STABILITY_LOG_PATTERNS
78
from datadog_checks.dev.kube_discovery import (
89
assert_all_discovery_candidates_stable_kubernetes,
910
run_discovery_check_kubernetes,
@@ -12,6 +13,17 @@
1213

1314
from .common import OPTIONAL_METRICS, TEST_METRICS
1415

16+
BENIGN_DISCOVERY_ERROR_LOG_PATTERNS = (
17+
r'BackupStorageLocation is in unavailable state, skip syncing backup from it',
18+
r'Current BackupStorageLocations available/unavailable/unknown:',
19+
)
20+
21+
# Velero can log backup-storage-location state transitions at error level while its controllers settle.
22+
DISCOVERY_STABILITY_LOG_PATTERNS = tuple(
23+
r'error(?!.*(?:{}))'.format('|'.join(BENIGN_DISCOVERY_ERROR_LOG_PATTERNS)) if pattern == 'error' else pattern
24+
for pattern in CONTAINER_STABILITY_LOG_PATTERNS
25+
)
26+
1527

1628
@pytest.mark.e2e
1729
def test_check_velero_e2e(dd_agent_check):
@@ -49,4 +61,5 @@ def test_e2e_discovery_all_candidates(aggregator, datadog_agent):
4961
datadog_agent,
5062
namespace='velero',
5163
pod_selector='name=velero',
64+
log_patterns=DISCOVERY_STABILITY_LOG_PATTERNS,
5265
)

0 commit comments

Comments
 (0)