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

[SECURITY_SOLUTION] unskip tests after fixing Kibana and package #78954

Merged
merged 8 commits into from
Sep 30, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "doc",
"value": {
"id": "M92ScEJT9M9QusfIi3hpEb0AAAAAAAAA",
"index": "metrics-endpoint.metadata_current-default",
"index": "metrics-endpoint.metadata_current_default",
"source": {
"HostDetails": {
"@timestamp": 1579881969541,
Expand Down Expand Up @@ -75,7 +75,7 @@
"type": "doc",
"value": {
"id": "OU3RgCJaNnR90byeDEHutp8AAAAAAAAA",
"index": "metrics-endpoint.metadata_current-default",
"index": "metrics-endpoint.metadata_current_default",
"source": {
"HostDetails": {
"@timestamp": 1579881969541,
Expand Down Expand Up @@ -151,7 +151,7 @@
"type": "doc",
"value": {
"id": "YjqDCEuI6JmLeLOSyZx_NhMAAAAAAAAA",
"index": "metrics-endpoint.metadata_current-default",
"index": "metrics-endpoint.metadata_current_default",
"source": {
"HostDetails": {
"@timestamp": 1579881969541,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export default function (providerContext: FtrProviderContext) {
.send({ force: true });
};

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/72102
describe.skip('installs and uninstalls all assets', async () => {
describe('installs and uninstalls all assets', async () => {
describe('installs all assets when installing a package for the first time', async () => {
skipIfNoDockerRegistry(providerContext);
before(async () => {
Expand Down Expand Up @@ -88,7 +87,7 @@ export default function (providerContext: FtrProviderContext) {
it('should have installed the transform components', async function () {
const res = await es.transport.request({
method: 'GET',
path: `/_transform/${pkgName}-test-default-${pkgVersion}`,
path: `/_transform/${pkgName}.test-default-${pkgVersion}`,
});
expect(res.statusCode).equal(200);
});
Expand Down Expand Up @@ -170,7 +169,7 @@ export default function (providerContext: FtrProviderContext) {
type: 'index_template',
},
{
id: 'logs-all_assets.test_logs-default-0.1.0',
id: 'all_assets.test-default-0.1.0',
type: 'transform',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export default function (providerContext: FtrProviderContext) {
.send({ force: true });
};

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/72102
describe.skip('updates all assets when updating a package to a different version', async () => {
describe('updates all assets when updating a package to a different version', async () => {
skipIfNoDockerRegistry(providerContext);
before(async () => {
await installPackage(pkgKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"index": "logs-all_assets.test_log-default*"
},
"dest": {
"index": "logs-all_assets.test_log_current-default"
"index": "logs-all_assets.test_log_current_default"
},
"pivot": {
"group_by": {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/ingest_manager_api_integration/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineDockerServersConfig } from '@kbn/test';
// Docker image to use for Ingest Manager API integration tests.
// This hash comes from the commit hash here: https://github.com/elastic/package-storage/commit
export const dockerImage =
'docker.elastic.co/package-registry/distribution:5e0e12ce1bc2cb0c2f67f2e07d11b9a6043bcf25';
'docker.elastic.co/package-registry/distribution:518a65a993ab7e9c77b1d8d20cd6f847921d04ec';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
],
];

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/72102
describe.skip('endpoint list', function () {
describe('endpoint list', function () {
this.tags('ciGroup7');
const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms));

Expand All @@ -85,17 +84,16 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
});

it('finds data after load and polling', async () => {
await esArchiver.load('endpoint/metadata/api_feature', { useCreate: true });
await pageObjects.endpoint.waitForTableToHaveData('endpointListTable', 100000);
await esArchiver.load('endpoint/metadata/destination_index', { useCreate: true });
Copy link
Contributor

@jonathan-buttner jonathan-buttner Sep 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm @nnamdifrankie is the index metrics-endpoint.metadata_current_default a data stream? If it is then this is fine. If it is not a data stream we should be able to omit the { useCreate: true } and we'd need to put the mapping file in the directory like we used to.

If the tests work like this though, I guess that's fine too 🤷

Copy link
Contributor

@nnamdifrankie nnamdifrankie Sep 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathan-buttner Well it works because we have an index template that matches the index, so you can search. I was curious about the useCreate here but I guess it did not make a difference. Ideally we should be using the transform e2e but it is expensive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathan-buttner it's not a datastream. My guess on why the tests work is because the index gets created by the transform that's running. I can omit the useCreate to see what happens

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na I wouldn't worry about it then. The only thing useCreate does is have es_archiver use create instead of index which means that it can't update a document.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await pageObjects.endpoint.waitForTableToHaveData('endpointListTable', 1100);
const tableData = await pageObjects.endpointPageUtils.tableData('endpointListTable');
expect(tableData).to.eql(expectedData);
});
});

describe('when there is data,', () => {
before(async () => {
await esArchiver.load('endpoint/metadata/api_feature', { useCreate: true });
await sleep(100000);
await esArchiver.load('endpoint/metadata/destination_index', { useCreate: true });
await pageObjects.endpoint.navigateToEndpointList();
});
after(async () => {
Expand Down Expand Up @@ -212,7 +210,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

describe('displays the correct table data for the kql queries', () => {
before(async () => {
await esArchiver.load('endpoint/metadata/api_feature', { useCreate: true });
await esArchiver.load('endpoint/metadata/destination_index', { useCreate: true });
await pageObjects.endpoint.navigateToEndpointList();
});
after(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export default function (providerContext: FtrProviderContext) {
const supertestWithoutAuth = getSupertestWithoutAuth(providerContext);
let agentAccessAPIKey: string;

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/72102
describe.skip('artifact download', () => {
describe('artifact download', () => {
before(async () => {
await esArchiver.load('endpoint/artifacts/api_feature', { useCreate: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const supertest = getService('supertest');

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/72102
describe.skip('test metadata api', () => {
describe('test metadata api', () => {
describe(`POST ${METADATA_REQUEST_ROUTE} when index is empty`, () => {
it('metadata api should return empty result when index is empty', async () => {
await deleteMetadataStream(getService);
Expand Down