Skip to content

Commit

Permalink
add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Jan 21, 2025
1 parent 892d7fc commit 67fdf8d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/platform/packages/shared/kbn-es-query/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,17 @@ describe('util tests', () => {
it('should validate CCS pattern', () => {
expect(isCCSRemoteIndexName('*:logstash-{now/d-2d}')).toBe(true);
});

it('should not validate selctor with wildcard', () => {
expect(isCCSRemoteIndexName('my-data-stream::*')).toBe(false);
});

it('should not validate index name with selector', () => {
expect(isCCSRemoteIndexName('my-data-stream::failures')).toBe(false);
});

it('should not validate wildcard with selector', () => {
expect(isCCSRemoteIndexName('-logs-*::data')).toBe(false);
});
});
});

0 comments on commit 67fdf8d

Please sign in to comment.