Skip to content

Commit

Permalink
Move src/legacy/server/keystore to src/cli (#83483)
Browse files Browse the repository at this point in the history
Currently keystore parsing is in the legacy http server folder.
Keystore references end in src/cli so instead of migrating to
core/server the I opted for the closest fit in the CLI folder.

Closes #52107
  • Loading branch information
jbudz committed Nov 17, 2020
1 parent 112e3c7 commit c858019
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { set } from '@elastic/safer-lodash-set';

import { Keystore } from '../../legacy/server/keystore';
import { Keystore } from '../keystore';
import { getKeystore } from '../../cli_keystore/get_keystore';

export function readKeystore(keystorePath = getKeystore()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import path from 'path';
import { readKeystore } from './read_keystore';

jest.mock('../../legacy/server/keystore');
import { Keystore } from '../../legacy/server/keystore';
jest.mock('../keystore');
import { Keystore } from '../keystore';

describe('cli/serve/read_keystore', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { getConfigPath } from '@kbn/utils';
import { IS_KIBANA_DISTRIBUTABLE } from '../../legacy/utils';
import { fromRoot } from '../../core/server/utils';
import { bootstrap } from '../../core/server';
import { readKeystore } from './read_keystore';
import { readKeystore } from '../keystore/read_keystore';

function canRequire(path) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/cli_keystore/add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jest.mock('fs', () => ({
import sinon from 'sinon';
import { PassThrough } from 'stream';

import { Keystore } from '../legacy/server/keystore';
import { Keystore } from '../cli/keystore';
import { add } from './add';
import { Logger } from '../cli_plugin/lib/logger';
import * as prompt from './utils/prompt';
Expand Down
2 changes: 1 addition & 1 deletion src/cli_keystore/cli_keystore.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import _ from 'lodash';

import { pkg } from '../core/server/utils';
import Command from '../cli/command';
import { Keystore } from '../legacy/server/keystore';
import { Keystore } from '../cli/keystore';

import { createCli } from './create';
import { listCli } from './list';
Expand Down
2 changes: 1 addition & 1 deletion src/cli_keystore/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jest.mock('fs', () => ({

import sinon from 'sinon';

import { Keystore } from '../legacy/server/keystore';
import { Keystore } from '../cli/keystore';
import { create } from './create';
import { Logger } from '../cli_plugin/lib/logger';
import * as prompt from './utils/prompt';
Expand Down
2 changes: 1 addition & 1 deletion src/cli_keystore/list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jest.mock('fs', () => ({
}));

import sinon from 'sinon';
import { Keystore } from '../legacy/server/keystore';
import { Keystore } from '../cli//keystore';
import { list } from './list';
import { Logger } from '../cli_plugin/lib/logger';

Expand Down
2 changes: 1 addition & 1 deletion src/cli_keystore/remove.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jest.mock('fs', () => ({

import sinon from 'sinon';

import { Keystore } from '../legacy/server/keystore';
import { Keystore } from '../cli/keystore';
import { remove } from './remove';

describe('Kibana keystore', () => {
Expand Down

0 comments on commit c858019

Please sign in to comment.