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'));