Skip to content

Commit

Permalink
[8.x] Skip UA tests when running fwd-compatibility tests (#204650) (#…
Browse files Browse the repository at this point in the history
…204899)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Skip UA tests when running fwd-compatibility tests
(#204650)](#204650)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T09:55:43Z","message":"Skip
UA tests when running fwd-compatibility tests (#204650)\n\n##
Summary\n\nResolves #204520\n\nReasoning
in\nhttps://github.com//issues/204520#issuecomment-2549445238\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6aaa2eae962927e13eeaa1337e8f5f5ee6b825a5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"title":"Skip
UA tests when running fwd-compatibility
tests","number":204650,"url":"https://github.com/elastic/kibana/pull/204650","mergeCommit":{"message":"Skip
UA tests when running fwd-compatibility tests (#204650)\n\n##
Summary\n\nResolves #204520\n\nReasoning
in\nhttps://github.com//issues/204520#issuecomment-2549445238\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6aaa2eae962927e13eeaa1337e8f5f5ee6b825a5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204650","number":204650,"mergeCommit":{"message":"Skip
UA tests when running fwd-compatibility tests (#204650)\n\n##
Summary\n\nResolves #204520\n\nReasoning
in\nhttps://github.com//issues/204520#issuecomment-2549445238\n\n\n###
Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"6aaa2eae962927e13eeaa1337e8f5f5ee6b825a5"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <[email protected]>
  • Loading branch information
kibanamachine and afharo authored Dec 19, 2024
1 parent c0069f5 commit 5f539ab
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion x-pack/test/api_integration/apis/upgrade_assistant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,25 @@
* 2.0.
*/

import { version as kibanaVersion } from '../../../../../package.json';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
export default function ({ loadTestFile, getService }: FtrProviderContext) {
describe('Upgrade Assistant', function () {
const es = getService('es');

before(
"Check version to avoid failures during forward-compatibility tests where these don't make sense",
async function () {
const {
version: { number: esVersion },
} = await es.info();
if (esVersion.replace('-SNAPSHOT', '') !== kibanaVersion.replace('-SNAPSHOT', '')) {
this.skip();
}
}
);

loadTestFile(require.resolve('./upgrade_assistant'));
loadTestFile(require.resolve('./cloud_backup_status'));
loadTestFile(require.resolve('./privileges'));
Expand Down

0 comments on commit 5f539ab

Please sign in to comment.