Skip to content

Commit

Permalink
Skip UA tests when running fwd-compatibility tests (elastic#204650)
Browse files Browse the repository at this point in the history
## Summary

Resolves elastic#204520

Reasoning in
elastic#204520 (comment)


### 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
  • Loading branch information
afharo authored Dec 19, 2024
1 parent 65437c4 commit 6aaa2ea
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 6aaa2ea

Please sign in to comment.