Skip to content

Commit

Permalink
Skip UA tests when running fwd-compatibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo committed Dec 17, 2024
1 parent 62c99f7 commit 55e78d5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 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,26 @@
* 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 () => {
const {
version: { number: esVersion },
} = await es.info();
if (esVersion !== kibanaVersion) {
// @ts-expect-error for some reason TS thinks it's jest and not mocha: https://mochajs.org/#inclusive-tests
this.skip();
}
}
);

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

0 comments on commit 55e78d5

Please sign in to comment.