Skip to content

Commit

Permalink
Removes locked source fork from API integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrhodes committed Oct 3, 2023
1 parent 213232e commit 96f6715
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 168 deletions.
3 changes: 1 addition & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ disabled:
- x-pack/test/plugin_api_perf/config.js
- x-pack/test/screenshot_creation/config.ts
- x-pack/test/fleet_packages/config.ts
- x-pack/test/api_integration/apis/asset_manager/config_with_assets_source.ts

# Scalability testing config that we run in its own pipeline
- x-pack/test/scalability/config.ts
Expand Down Expand Up @@ -174,7 +173,7 @@ enabled:
- x-pack/test/api_integration/config_security_trial.ts
- x-pack/test/api_integration/apis/aiops/config.ts
- x-pack/test/api_integration/apis/asset_manager/config_when_disabled.ts
- x-pack/test/api_integration/apis/asset_manager/config_with_signals_source.ts
- x-pack/test/api_integration/apis/asset_manager/config_when_enabled.ts
- x-pack/test/api_integration/apis/cases/config.ts
- x-pack/test/api_integration/apis/cloud_security_posture/config.ts
- x-pack/test/api_integration/apis/console/config.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async function createTestConfig({

return {
...baseIntegrationTestsConfig.getAll(),
testFiles: [require.resolve('./tests/with_assets_source')],
testFiles: [require.resolve('./tests')],
services: {
...services,
assetsSynthtraceEsClient: (context: InheritedFtrProviderContext) => {
Expand Down Expand Up @@ -87,7 +87,6 @@ export default async function createTestConfig({
serverArgs: [
...baseIntegrationTestsConfig.get('kbnTestServer.serverArgs'),
'--xpack.assetManager.alphaEnabled=true',
`--xpack.assetManager.lockedSource=assets`,
],
},
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import { AssetWithoutTimestamp } from '@kbn/assetManager-plugin/common/types_api';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from '../helpers';
import { ASSETS_ENDPOINT } from '../constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from './helpers';
import { ASSETS_ENDPOINT } from './constants';

export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { sortBy } from 'lodash';

import { AssetWithoutTimestamp } from '@kbn/assetManager-plugin/common/types_api';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from '../helpers';
import { ASSETS_ENDPOINT } from '../constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from './helpers';
import { ASSETS_ENDPOINT } from './constants';

const DIFF_ENDPOINT = `${ASSETS_ENDPOINT}/diff`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { pick } from 'lodash';

import { Asset, AssetWithoutTimestamp } from '@kbn/assetManager-plugin/common/types_api';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from '../helpers';
import { ASSETS_ENDPOINT } from '../constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from './helpers';
import { ASSETS_ENDPOINT } from './constants';

const RELATED_ASSETS_ENDPOINT = `${ASSETS_ENDPOINT}/related`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
Expand All @@ -21,8 +21,8 @@ export default function ({ getService }: FtrProviderContext) {
});

describe('assets index templates', () => {
it('should not be installed', async () => {
await esSupertest.get('/_index_template/assets').expect(404);
it('should always be installed', async () => {
await esSupertest.get('/_index_template/assets').expect(200);
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import { timerange, infra } from '@kbn/apm-synthtrace-client';
import expect from '@kbn/expect';
import { ASSETS_ENDPOINT } from '../constants';
import { FtrProviderContext } from '../../types';
import { ASSETS_ENDPOINT } from './constants';
import { FtrProviderContext } from '../types';

const HOSTS_ASSETS_ENDPOINT = `${ASSETS_ENDPOINT}/hosts`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Asset Manager API Endpoints - with assets source', () => {
describe('Asset Manager API Endpoints', () => {
loadTestFile(require.resolve('./basics'));
loadTestFile(require.resolve('./hosts'));
loadTestFile(require.resolve('./services'));
loadTestFile(require.resolve('./sample_assets'));
loadTestFile(require.resolve('./assets'));
loadTestFile(require.resolve('./assets_diff'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import { Asset } from '@kbn/assetManager-plugin/common/types_api';
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from '../helpers';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { createSampleAssets, deleteSampleAssets, viewSampleAssetDocs } from './helpers';

export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { omit } from 'lodash';
import { apm, timerange } from '@kbn/apm-synthtrace-client';
import expect from '@kbn/expect';
import { ASSETS_ENDPOINT } from '../constants';
import { FtrProviderContext } from '../../types';
import { ASSETS_ENDPOINT } from './constants';
import { FtrProviderContext } from '../types';

const SERVICES_ASSETS_ENDPOINT = `${ASSETS_ENDPOINT}/services`;

Expand Down Expand Up @@ -49,7 +49,7 @@ export default function ({ getService }: FtrProviderContext) {
.query({
from,
to,
parent: 'my-host-1',
parent: 'host:my-host-1',
})
.expect(200);

Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/test/api_integration/apis/asset_manager/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { GenericFtrProviderContext } from '@kbn/test';
import { FtrProviderContext as InheritedFtrProviderContext } from '../../ftr_provider_context';
import { AssetManagerServices } from './config_with_signals_source';
import { AssetManagerServices } from './config_when_enabled';

export type InheritedServices = InheritedFtrProviderContext extends GenericFtrProviderContext<
infer TServices,
Expand Down

0 comments on commit 96f6715

Please sign in to comment.