mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix matching labels with spaces in their values (#68909)
Fix matching labels with spaces in their values
This commit is contained in:
parent
0c85327bed
commit
fb7993d021
@ -85,6 +85,17 @@ describe('Alertmanager utils', () => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should parse with spaces in the value', () => {
|
||||||
|
expect(parseMatchers('foo=bar bazz')).toEqual<Matcher[]>([
|
||||||
|
{
|
||||||
|
name: 'foo',
|
||||||
|
value: 'bar bazz',
|
||||||
|
isRegex: false,
|
||||||
|
isEqual: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
it('should return nothing for invalid operator', () => {
|
it('should return nothing for invalid operator', () => {
|
||||||
expect(parseMatchers('foo=!bar')).toEqual([]);
|
expect(parseMatchers('foo=!bar')).toEqual([]);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user