grafana/public/app/features/alerting/unified/__snapshots__/NotificationPolicies.test.t...

314 lines
6.2 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Grafana alertmanager - config API Converts matchers to object_matchers for grafana alertmanager 1`] = `
[
[
"sub1matcher1",
"=",
"sub1value1",
],
[
"sub1matcher2",
"=",
"sub1value2",
],
[
"sub1matcher3",
"=~",
"sub1value3",
],
[
"sub1matcher4",
"=~",
"sub1value4",
],
]
`;
exports[`Non-Grafana alertmanagers Keeps matchers for non-grafana alertmanager sources 1`] = `
[
"hello="world"",
"foo!="bar"",
]
`;
exports[`findRoutesMatchingFilters should not match non-existing 1`] = `
{
"filtersApplied": true,
"matchedRoutesWithPath": Map {},
}
`;
exports[`findRoutesMatchingFilters should work with all filters 1`] = `
{
"filtersApplied": true,
"matchedRoutesWithPath": Map {
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
} => [
{
"id": "0",
"receiver": "default-receiver",
"routes": [
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
}
`;
exports[`findRoutesMatchingFilters should work with non-intersecting filters 1`] = `
{
"filtersApplied": true,
"matchedRoutesWithPath": Map {},
}
`;
exports[`findRoutesMatchingFilters should work with only contact point and inheritance 1`] = `
{
"filtersApplied": true,
"matchedRoutesWithPath": Map {
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
} => [
{
"id": "0",
"receiver": "default-receiver",
"routes": [
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
} => [
{
"id": "0",
"receiver": "default-receiver",
"routes": [
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
}
`;
exports[`findRoutesMatchingFilters should work with only label matchers 1`] = `
{
"filtersApplied": true,
"matchedRoutesWithPath": Map {
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
} => [
{
"id": "0",
"receiver": "default-receiver",
"routes": [
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
{
"id": "1",
"matchers": [
"hello=world",
"foo!=bar",
],
"receiver": "simple-receiver",
"routes": [
{
"id": "2",
"matchers": [
"bar=baz",
],
"receiver": "simple-receiver",
"routes": undefined,
},
],
},
],
},
}
`;