From 6aaa2eae962927e13eeaa1337e8f5f5ee6b825a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Thu, 19 Dec 2024 10:55:43 +0100 Subject: [PATCH] Skip UA tests when running fwd-compatibility tests (#204650) ## Summary Resolves #204520 Reasoning in https://github.com/elastic/kibana/issues/204520#issuecomment-2549445238 ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../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'));