-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QA][Code Coverage] Coverage teams lookup w/o Additional Config (#77111)
* [QA][Code Coverage] Coverage teams lookup * Fix test per cr. * Drop unused fn's. * Add integration test to prove that the sys does indeed strip the CC prefix and still walks the fs. * Cleanup "todo" list. * Use import, like Dima's previous suggestion. * Add coverage teams only definitions to CODEOWNERS per Lee. * Add coverage teams for logstash, reporting and security. * Update description. * Update names per Lee. * Drop mutation. * Fix dupes. * Add the file check, per Dima * Add more teams * Update regex to only match on "build/" and add test. * More teams * More teams * Add print statement of the canonical timestamp, so we can lookup stuff in gcp during errors. * CR fixups
- Loading branch information
1 parent
085cac1
commit 3a73e0b
Showing
36 changed files
with
1,051 additions
and
208 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
Validating CODEOWNERS rules …
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
60 changes: 60 additions & 0 deletions
60
src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js
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,60 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
import { enumeratePatterns } from '../team_assignment/enumerate_patterns'; | ||
import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; | ||
|
||
const log = new ToolingLog({ | ||
level: 'info', | ||
writeTo: process.stdout, | ||
}); | ||
|
||
describe(`enumeratePatterns`, () => { | ||
it(`should resolve x-pack/plugins/reporting/server/browsers/extract/unzip.js to kibana-reporting`, () => { | ||
const actual = enumeratePatterns(REPO_ROOT)(log)( | ||
new Map([['x-pack/plugins/reporting', ['kibana-reporting']]]) | ||
); | ||
|
||
expect( | ||
actual[0].includes( | ||
'x-pack/plugins/reporting/server/browsers/extract/unzip.js kibana-reporting' | ||
) | ||
).to.be(true); | ||
}); | ||
it(`should resolve src/plugins/charts/public/static/color_maps/color_maps.ts to kibana-app`, () => { | ||
const actual = enumeratePatterns(REPO_ROOT)(log)( | ||
new Map([['src/plugins/charts/public/static/color_maps', ['kibana-app']]]) | ||
); | ||
|
||
expect(actual[0][0]).to.be( | ||
'src/plugins/charts/public/static/color_maps/color_maps.ts kibana-app' | ||
); | ||
}); | ||
it(`should resolve x-pack/plugins/security_solution/public/common/components/exceptions/builder/translations.ts to kibana-security`, () => { | ||
const short = 'x-pack/plugins/security_solution'; | ||
const actual = enumeratePatterns(REPO_ROOT)(log)(new Map([[short, ['kibana-security']]])); | ||
|
||
expect( | ||
actual[0].includes( | ||
`${short}/public/common/components/exceptions/builder/translations.ts kibana-security` | ||
) | ||
).to.be(true); | ||
}); | ||
}); |
Oops, something went wrong.