Last active
July 12, 2019 14:26
-
-
Save evnsio/6fc5a0c2c642e7b45d19a0a20cbb9622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
import os | |
TEST_CASES = [ | |
("alertname=SomeAlert", "some-alert-receiver"), | |
("owner=platform severity=warning", "slack-platform-alerts"), | |
("owner=platform severity=critical", "pagerduty-platform-team"), | |
("severity=info", "slack-monitoring"), | |
("severity=warning", "slack-monitoring,pd-platform-warning"), | |
("severity=critical", "slack-monitoring,pd-platform-critical"), | |
] | |
@pytest.mark.parametrize("labels,receivers", TEST_CASES) | |
def test_routing(labels, receivers): | |
cmd = f"amtool config routes test --config.file=./am-config.yaml --verify.receivers={receivers} {labels}" | |
exit_code = os.system(cmd) | |
assert exit_code == 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment