Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.17] skip tests broken when testing against 8.0 #123427

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/functional/apps/management/_scripted_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function ({ getService, getPageObjects }) {

describe('scripted fields', function () {
this.tags(['skipFirefox']);
this.onlyEsVersion('<=7');

before(async function () {
await browser.setWindowSize(1200, 800);
Expand Down
4 changes: 3 additions & 1 deletion x-pack/test/accessibility/apps/upgrade_assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
const log = getService('log');

describe('Upgrade Assistant', () => {
describe('Upgrade Assistant', function () {
this.onlyEsVersion('<=7');

before(async () => {
await PageObjects.upgradeAssistant.navigateToPage();

Expand Down
11 changes: 8 additions & 3 deletions x-pack/test/api_integration/apis/lens/existing_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ const metricBeatData = [
export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const supertest = getService('supertest');
const esVersion = getService('esVersion');

function fieldFilter(fieldName: string) {
return esVersion.matchRange('>=8') ? fieldName !== '_type' : true;
}

describe('existing_fields apis', () => {
before(async () => {
Expand Down Expand Up @@ -189,7 +194,7 @@ export default ({ getService }: FtrProviderContext) => {
.expect(200);

expect(body.indexPatternTitle).to.eql('logstash-*');
expect(body.existingFieldNames.sort()).to.eql(fieldsWithData.sort());
expect(body.existingFieldNames.sort()).to.eql(fieldsWithData.sort().filter(fieldFilter));
});

it('should succeed for thousands of fields', async () => {
Expand All @@ -204,7 +209,7 @@ export default ({ getService }: FtrProviderContext) => {
.expect(200);

expect(body.indexPatternTitle).to.eql('metricbeat-*');
expect(body.existingFieldNames.sort()).to.eql(metricBeatData.sort());
expect(body.existingFieldNames.sort()).to.eql(metricBeatData.sort().filter(fieldFilter));
});

it('should return fields filtered by query and filters', async () => {
Expand Down Expand Up @@ -243,7 +248,7 @@ export default ({ getService }: FtrProviderContext) => {
'utc_time',
'xss',
'xss.raw',
];
].filter(fieldFilter);

const { body } = await supertest
.post(`/api/lens/existing_fields/${encodeURIComponent('logstash-*')}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export default function ({ getService }) {

const { addPolicyToIndex } = registerIndexHelpers({ supertest });

describe('policies', () => {
describe('policies', function () {
this.onlyEsVersion('<=7');

after(() => Promise.all([cleanUpEsResources(), cleanUpPolicies()]));

describe('list', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export default function ({ getService }) {
clearCache,
} = registerHelpers({ supertest });

describe('indices', () => {
describe('indices', function () {
this.onlyEsVersion('<=7');

after(() => Promise.all([cleanUpEsResources()]));

describe('clear cache', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export default function ({ getService }) {

const { getIndexMapping } = registerHelpers({ supertest });

describe('mapping', () => {
describe('mapping', function () {
this.onlyEsVersion('<=7');

after(() => Promise.all([cleanUpEsResources()]));

it('should fetch the index mapping', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export default function ({ getService }) {

const { getIndexSettings, updateIndexSettings } = registerHelpers({ supertest });

describe('settings', () => {
describe('settings', function () {
this.onlyEsVersion('<=7');

after(() => Promise.all([cleanUpEsResources()]));

it('should fetch an index settings', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export default function ({ getService }) {
cleanUpTemplates,
} = registerHelpers({ supertest });

describe('index templates', () => {
describe('index templates', function () {
this.onlyEsVersion('<=7');

after(() => Promise.all([cleanUpEsResources(), cleanUpTemplates()]));

describe('get all', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default function ({ getService }) {
cleanUp,
} = registerHelpers(getService);

describe('jobs', () => {
describe('jobs', function () {
this.onlyEsVersion('<=7');

after(() => cleanUp());

describe('indices', () => {
Expand Down
4 changes: 3 additions & 1 deletion x-pack/test/api_integration/apis/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

describe('search', () => {
describe('search', function () {
this.onlyEsVersion('<=7');

// https://github.com/elastic/kibana/issues/113082
describe.skip('post', () => {
it('should return 200 with final response if wait_for_completion_timeout is long enough', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const supertest = getService('supertest');
const bsearch = getService('bsearch');
const esVersion = getService('esVersion');

describe('Timeline Details', () => {
before(
Expand All @@ -703,7 +704,12 @@ export default function ({ getService }: FtrProviderContext) {
},
strategy: 'timelineSearchStrategy',
});
expect(sortBy(detailsData, 'field')).to.eql(sortBy(EXPECTED_DATA, 'field'));

const expectedData = esVersion.matchRange('>=8')
? sortBy(EXPECTED_DATA, 'field').filter((f) => f.field !== '_type')
: sortBy(EXPECTED_DATA, 'field');

expect(sortBy(detailsData, 'field')).to.eql(expectedData);
});

it('Make sure that we get kpi data', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Upgrade Assistant', () => {
describe('Upgrade Assistant', function () {
this.onlyEsVersion('<=7');

loadTestFile(require.resolve('./upgrade_assistant'));
loadTestFile(require.resolve('./cloud_backup_status'));
loadTestFile(require.resolve('./privileges'));
Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/api_keys/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const browser = getService('browser');

describe('Home page', function () {
this.onlyEsVersion('<=7');

before(async () => {
await security.testUser.setRoles(['kibana_admin']);
await pageObjects.common.navigateToApp('apiKeys');
Expand Down
4 changes: 3 additions & 1 deletion x-pack/test/functional/apps/discover/reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
return res;
};

describe('Discover CSV Export', () => {
describe('Discover CSV Export', function () {
this.onlyEsVersion('<=7');

before('initialize tests', async () => {
log.debug('ReportingPage:initTests');
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const appsMenu = getService('appsMenu');
const managementMenu = getService('managementMenu');

describe('security', () => {
describe('security', function () {
this.onlyEsVersion('<=7');

before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await PageObjects.common.navigateToApp('home');
Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/index_management/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const security = getService('security');

describe('Home page', function () {
this.onlyEsVersion('<=7');

before(async () => {
await security.testUser.setRoles(['index_management_user']);
await pageObjects.common.navigateToApp('indexManagement');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

describe('Ingest Pipelines', function () {
this.tags('smoke');
this.onlyEsVersion('<=7');

before(async () => {
await security.testUser.setRoles(['ingest_pipelines_user']);
await pageObjects.common.navigateToApp('ingestPipelines');
Expand Down
2 changes: 2 additions & 0 deletions x-pack/test/functional/apps/security/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
}

describe('users', function () {
this.onlyEsVersion('<=7');

const optionalUser: UserFormValues = {
username: 'OptionalUser',
password: 'OptionalUserPwd',
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/upgrade_assistant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function upgradeCheckup({ loadTestFile }: FtrProviderContext) {
describe('Upgrade Assistant', function upgradeAssistantTestSuite() {
this.tags('ciGroup4');
this.onlyEsVersion('<=7');

loadTestFile(require.resolve('./feature_controls'));
loadTestFile(require.resolve('./deprecation_pages'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function upgradeAssistantOverviewPageFunctionalTests({

describe('Overview Page', function () {
this.tags('skipFirefox');
this.onlyEsVersion('<=7');

before(async () => {
await security.testUser.setRoles(['superuser']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default function ({ getService }: FtrProviderContext) {
const fromTime = '2019-06-20T00:00:00.000Z';
const toTime = '2019-06-25T00:00:00.000Z';

describe('CSV Generation from SearchSource', () => {
describe('CSV Generation from SearchSource', function () {
this.onlyEsVersion('<=7');

before(async () => {
await kibanaServer.uiSettings.update({
'csv:quoteValues': false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { FtrProviderContext } from '../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const reportingAPI = getService('reportingAPI');

describe('Generate CSV from SearchSource', () => {
describe('Generate CSV from SearchSource', function () {
this.onlyEsVersion('<=7');

it(`exported CSV file matches snapshot`, async () => {
await reportingAPI.initEcommerce();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default function ({ getService }: FtrProviderContext) {
const reportingAPI = getService('reportingAPI');
const security = getService('security');

describe('ILM policy migration APIs', () => {
describe('ILM policy migration APIs', function () {
this.onlyEsVersion('<=7');

before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/reporting/logs');
await esArchiver.load('x-pack/test/functional/es_archives/logstash_functional');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export default function ({ getService }: FtrProviderContext) {
.send(job);
}

describe('Frozen indices search', () => {
describe('Frozen indices search', function () {
this.onlyEsVersion('<=7');

const reset = async () => {
await kibanaServer.uiSettings.replace({ 'search:includeFrozen': false });
try {
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/security_api_integration/kerberos.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...xPackAPITestsConfig.get('esTestCluster.serverArgs'),
'xpack.security.authc.token.enabled=true',
'xpack.security.authc.token.timeout=15s',
'xpack.security.authc.realms.kerberos.kerb1.order=0',
`xpack.security.authc.realms.kerberos.kerb1.keytab.path=${kerberosKeytabPath}`,
],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export default function ({ getService }: FtrProviderContext) {
});
};

describe('Endpoint package', () => {
describe('Endpoint package', function () {
this.onlyEsVersion('<=7');

describe('network processors', () => {
let networkIndexData: InsertedEvents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
export default function ({ loadTestFile }) {
describe('upgrade assistant', function () {
this.tags('ciGroup7');
this.onlyEsVersion('<=7');

loadTestFile(require.resolve('./reindexing'));
});
Expand Down