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.x] Migrate security and spaces integration test plugins to Kibana Platform (#66415) #66470

Merged
merged 1 commit into from
May 14, 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
5 changes: 1 addition & 4 deletions x-pack/test/saved_object_api_integration/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
...config.xpack.api.get('kbnTestServer.serverArgs'),
'--optimize.enabled=false',
'--server.xsrf.disableProtection=true',
`--plugin-path=${path.join(__dirname, 'fixtures', 'isolated_type_plugin')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'namespace_agnostic_type_plugin')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'hidden_type_plugin')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'shared_type_plugin')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'saved_object_test_plugin')}`,
...disabledPlugins.map(key => `--xpack.${key}.enabled=false`),
],
},
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"id": "savedObjectTestPlugin",
"version": "kibana",
"server": true,
"ui": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { Plugin } from './plugin';

export function plugin() {
return new Plugin();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { CoreSetup, SavedObject } from 'kibana/server';

export class Plugin {
constructor() {}

public setup(core: CoreSetup) {
// called when plugin is setting up during Kibana's startup sequence
const management = {
importableAndExportable: true,
getTitle(obj: SavedObject<any>) {
return obj.attributes.title;
},
};
const mappings = {
properties: {
title: { type: 'text' },
},
};

core.savedObjects.registerType({
name: 'isolatedtype',
hidden: false,
namespaceType: 'single',
management,
mappings: {
properties: {
description: { type: 'text' },
kibanaSavedObjectMeta: {
properties: {
searchSourceJSON: { type: 'text' },
},
},
savedSearchId: { type: 'keyword' },
title: { type: 'text' },
uiStateJSON: { type: 'text' },
version: { type: 'integer' },
visState: { type: 'text' },
},
},
});
core.savedObjects.registerType({
name: 'sharedtype',
hidden: false,
namespaceType: 'multiple',
mappings,
});
core.savedObjects.registerType({
name: 'globaltype',
hidden: false,
namespaceType: 'agnostic',
management,
mappings,
});
core.savedObjects.registerType({
name: 'hiddentype',
hidden: true,
namespaceType: 'single',
mappings,
});
}

public start() {
// called after all plugins are set up
}

public stop() {
// called when plugin is torn down during Kibana's shutdown sequence
}
}

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/test/spaces_api_integration/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
// disable anonymouse access so that we're testing both on and off in different suites
'--status.allowAnonymous=false',
'--server.xsrf.disableProtection=true',
`--plugin-path=${path.join(__dirname, 'fixtures', 'shared_type_plugin')}`,
`--plugin-path=${path.join(__dirname, 'fixtures', 'spaces_test_plugin')}`,
...disabledPlugins.map(key => `--xpack.${key}.enabled=false`),
],
},
Expand Down

This file was deleted.

Loading