From 5f539ab687beb9ef68d267badc157dbdafb3ec37 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:42:27 +1100 Subject: [PATCH] [8.x] Skip UA tests when running fwd-compatibility tests (#204650) (#204899) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.x`: - [Skip UA tests when running fwd-compatibility tests (#204650)](https://github.com/elastic/kibana/pull/204650) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Alejandro Fernández Haro --- .../apis/upgrade_assistant/index.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/index.ts b/x-pack/test/api_integration/apis/upgrade_assistant/index.ts index 21aeea27e6174..1f56a4a9563ed 100644 --- a/x-pack/test/api_integration/apis/upgrade_assistant/index.ts +++ b/x-pack/test/api_integration/apis/upgrade_assistant/index.ts @@ -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'));