forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Chore] Isolate CCS check (elastic#195988) (elastic#196869)
# Backport This will backport the following commits from `main` to `8.x`: - [[Chore] Isolate CCS check (elastic#195988)](elastic#195988) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Thomas Neirynck","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T12:40:04Z","message":"[Chore] Isolate CCS check (elastic#195988)\n\n## Summary\r\n\r\nIsolate CCS check in single location.\r\n\r\nCloses\r\nhttps://github.com/elastic/issues/193906#issuecomment-2400370478\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f86d1716b171d846851041d50da074683624fa02","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services","apm:review","v8.16.0"],"title":"[Chore] Isolate CCS check","number":195988,"url":"https://github.com/elastic/kibana/pull/195988","mergeCommit":{"message":"[Chore] Isolate CCS check (elastic#195988)\n\n## Summary\r\n\r\nIsolate CCS check in single location.\r\n\r\nCloses\r\nhttps://github.com/elastic/issues/193906#issuecomment-2400370478\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f86d1716b171d846851041d50da074683624fa02"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195988","number":195988,"mergeCommit":{"message":"[Chore] Isolate CCS check (elastic#195988)\n\n## Summary\r\n\r\nIsolate CCS check in single location.\r\n\r\nCloses\r\nhttps://github.com/elastic/issues/193906#issuecomment-2400370478\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f86d1716b171d846851041d50da074683624fa02"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Thomas Neirynck <[email protected]>
- Loading branch information
1 parent
f22cd72
commit bab9084
Showing
13 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { isCCSRemoteIndexName } from './utils'; | ||
|
||
describe('util tests', () => { | ||
describe('isCCSRemoteIndexName', () => { | ||
it('should not validate empty string', () => { | ||
expect(isCCSRemoteIndexName('')).toBe(false); | ||
}); | ||
|
||
it('should not validate date math expression', () => { | ||
expect(isCCSRemoteIndexName('<logstash-{now/d-2d}>')).toBe(false); | ||
}); | ||
|
||
it('should not validate date math expression with negation', () => { | ||
expect(isCCSRemoteIndexName('-<logstash-{now/d-2d}>')).toBe(false); | ||
}); | ||
|
||
it('should not validate invalid prefix', () => { | ||
expect(isCCSRemoteIndexName(':logstash-{now/d-2d}')).toBe(false); | ||
}); | ||
|
||
it('should validate CCS pattern', () => { | ||
expect(isCCSRemoteIndexName('*:logstash-{now/d-2d}')).toBe(true); | ||
}); | ||
}); | ||
}); |
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
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
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
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
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
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
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
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
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
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
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