Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed Nov 19, 2022
1 parent 8b57ed9 commit 9d9b102
Show file tree
Hide file tree
Showing 29 changed files with 50 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

import { Root } from '@kbn/core-root-server-internal';
'../../../test_helpers/kbn_server';
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server'
('../../../test_helpers/kbn_server');
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';

describe('Core app routes', () => {
let root: Root;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
*/

import { Root } from '@kbn/core-root-server-internal';
'../../../test_helpers/kbn_server';
import { createTestServers, createRootWithCorePlugins, request} from '@kbn/core-test-helpers-kbn-server'
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server'
('../../../test_helpers/kbn_server');
import {
createTestServers,
createRootWithCorePlugins,
request,
} from '@kbn/core-test-helpers-kbn-server';
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';

describe('default route provider', () => {
let esServer: TestElasticsearchUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Root } from '@kbn/core-root-server-internal';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';

describe('Platform assets', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
import { ExecutionContextContainer } from '@kbn/core-execution-context-browser-internal';
// import * as from '../../../test_helpers/kbn_server';
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createRoot, createTestServers, createRootWithCorePlugins, request } from '@kbn/core-test-helpers-kbn-server';
import {
createRoot,
createTestServers,
createRootWithCorePlugins,
request,
} from '@kbn/core-test-helpers-kbn-server';

import { RequestHandlerContext } from '../..';

Expand Down Expand Up @@ -344,15 +349,9 @@ describe('trace', () => {
});

await root.start();
const responseA = request
.get(root, '/execution-context')
.set('x-opaque-id', 'req-1');
const responseB = request
.get(root, '/execution-context')
.set('x-opaque-id', 'req-2');
const responseC = request
.get(root, '/execution-context')
.set('x-opaque-id', 'req-3');
const responseA = request.get(root, '/execution-context').set('x-opaque-id', 'req-1');
const responseB = request.get(root, '/execution-context').set('x-opaque-id', 'req-2');
const responseC = request.get(root, '/execution-context').set('x-opaque-id', 'req-3');

const [{ body: bodyA }, { body: bodyB }, { body: bodyC }] = await Promise.all([
responseA,
Expand Down
10 changes: 3 additions & 7 deletions src/core/server/integration_tests/http/core_services.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MockElasticsearchClient } from './core_service.test.mocks';
import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
import { errors } from '@elastic/elasticsearch';
import type { InternalElasticsearchServiceStart } from '@kbn/core-elasticsearch-server-internal';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';

const cookieOptions = {
Expand Down Expand Up @@ -141,9 +141,7 @@ describe('http service', () => {

await root.start();

await request
.get(root, '/get-auth')
.expect(200, { state: user, status: 'authenticated' });
await request.get(root, '/get-auth').expect(200, { state: user, status: 'authenticated' });
});

it('returns correct authentication unknown status', async () => {
Expand Down Expand Up @@ -173,9 +171,7 @@ describe('http service', () => {

await root.start();

await request
.get(root, '/get-auth')
.expect(200, { status: 'unauthenticated' });
await request.get(root, '/get-auth').expect(200, { status: 'unauthenticated' });

expect(authenticate).not.toHaveBeenCalled();
});
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/integration_tests/http/http_auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import type { IRouter, RouteConfigOptions, HttpAuth } from '@kbn/core-http-server';
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');

describe('http auth', () => {
let root: ReturnType<typeof createRoot>;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/integration_tests/http/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { schema } from '@kbn/config-schema';
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');

describe('request logging', () => {
let mockConsoleLog: jest.SpyInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { schema } from '@kbn/config-schema';
import { createRoot, request } from '@kbn/core-test-helpers-kbn-server';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');

describe('http resources service', () => {
describe('register', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/integration_tests/logging/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import type { LoggerContextConfigInput } from '@kbn/core-logging-server';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');
import { createRoot as createkbnTestServerRoot } from '@kbn/core-test-helpers-kbn-server';
import { InternalCoreSetup } from '@kbn/core-lifecycle-server-internal';
import { Subject } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { join } from 'path';
import { rm, mkdtemp, readFile, readdir } from 'fs/promises';
import moment from 'moment-timezone';
import { getNextRollingTime } from '@kbn/core-logging-server-internal';
'../../../test_helpers/kbn_server';
('../../../test_helpers/kbn_server');
import { createRoot as createkbnTestServerRoot } from '@kbn/core-test-helpers-kbn-server';

const flushDelay = 250;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/integration_tests/node/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

'../../../test_helpers/kbn_server';
'../../../test_helpers/kbn_server';
import { createRoot as createkbnTestServerRoot } from '@kbn/core-test-helpers-kbn-server';

function createRootWithRoles(roles: string[]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { REPO_ROOT } from '@kbn/utils';
import { Env } from '@kbn/config';
import { getEnvOptions } from '@kbn/config-mocks';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { InternalCoreStart } from '@kbn/core-lifecycle-server-internal';
import { Root } from '@kbn/core-root-server-internal';
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import fs from 'fs/promises';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import { Root } from '@kbn/core-root-server-internal';
import {
createRootWithCorePlugins,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ import { Env } from '@kbn/config';
import { REPO_ROOT } from '@kbn/utils';
import { getEnvOptions } from '@kbn/config-mocks';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import { Root } from '@kbn/core-root-server-internal';
import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types';
import { getMigrationDocLink } from './test_utils';
import { createRootWithCorePlugins, TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import {
createRootWithCorePlugins,
TestElasticsearchUtils,
} from '@kbn/core-test-helpers-kbn-server';
import { createTestServers as createkbnServerTestServers } from '@kbn/core-test-helpers-kbn-server';

const migrationDocLink = getMigrationDocLink().resolveMigrationFailures;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Env } from '@kbn/config';
import { REPO_ROOT } from '@kbn/utils';
import { getEnvOptions } from '@kbn/config-mocks';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import { Root } from '@kbn/core-root-server-internal';
import { createRootWithCorePlugins, createTestServers } from '@kbn/core-test-helpers-kbn-server';
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import fs from 'fs/promises';
import JSON5 from 'json5';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { Root } from '@kbn/core-root-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import fs from 'fs/promises';
import JSON5 from 'json5';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { retryAsync } from '@kbn/core-saved-objects-migration-server-mocks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import type { ISavedObjectTypeRegistry } from '@kbn/core-saved-objects-server';
import { getMigrationHash } from '@kbn/core-test-helpers-so-type-serializer';
import { Root } from '@kbn/core-root-server-internal';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Path from 'path';
import Fs from 'fs';
import Util from 'util';
import JSON5 from 'json5';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { Root } from '@kbn/core-root-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import Fs from 'fs';
import Util from 'util';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { Root } from '@kbn/core-root-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import Fs from 'fs';
import Util from 'util';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { Root } from '@kbn/core-root-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Path from 'path';
import fs from 'fs/promises';
import JSON5 from 'json5';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { Root } from '@kbn/core-root-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Env } from '@kbn/config';
import { getEnvOptions } from '@kbn/config-mocks';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { InternalCoreStart } from '@kbn/core-lifecycle-server-internal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { REPO_ROOT } from '@kbn/utils';
import { Env } from '@kbn/config';
import { getEnvOptions } from '@kbn/config-mocks';
import type { SavedObjectsRawDoc } from '@kbn/core-saved-objects-server';
'../../../../test_helpers/kbn_server'
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Path from 'path';
import del from 'del';
import { kibanaServerTestUser } from '@kbn/test';
import { kibanaPackageJson as pkg } from '@kbn/utils';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import {
createTestServers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import del from 'del';
import { esTestConfig, kibanaServerTestUser } from '@kbn/test';
import { kibanaPackageJson as pkg } from '@kbn/utils';
import type { SavedObjectsType } from '@kbn/core-saved-objects-server';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import {
createTestServers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Path from 'path';
import Fs from 'fs';
import Util from 'util';
import { kibanaPackageJson as pkg } from '@kbn/utils';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createRootWithCorePlugins, createTestServers } from '@kbn/core-test-helpers-kbn-server';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Path from 'path';
import Fs from 'fs';
import Util from 'util';
import { kibanaPackageJson as pkg } from '@kbn/utils';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import type { TestElasticsearchUtils } from '@kbn/core-test-helpers-kbn-server';
import { createRootWithCorePlugins, createTestServers } from '@kbn/core-test-helpers-kbn-server';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { REMOVED_TYPES } from '@kbn/core-saved-objects-migration-server-internal';
'../../../../test_helpers/kbn_server';
('../../../../test_helpers/kbn_server');
import { createRoot } from '@kbn/core-test-helpers-kbn-server';

// Types should NEVER be removed from this array
Expand Down

0 comments on commit 9d9b102

Please sign in to comment.