Skip to content

Commit

Permalink
revert test config props
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jun 23, 2021
1 parent 8a28a62 commit c74ada5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions src/core/server/http/cookie_session_storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { CoreContext } from '../core_context';
import { HttpService } from './http_service';
import { KibanaRequest } from './router';
import { Env } from '../config';
import type { CspConfigType } from '../csp';

import { contextServiceMock } from '../context/context_service.mock';
import { loggingSystemMock } from '../logging/logging_system.mock';
Expand Down Expand Up @@ -71,13 +70,10 @@ configService.atPath.mockImplementation((path) => {
}
if (path === 'csp') {
return new BehaviorSubject({
script_src: [],
worker_src: [],
style_src: [],
strict: false,
disableEmbedding: false,
warnLegacyBrowsers: true,
} as CspConfigType);
});
}
throw new Error(`Unexpected config path: ${path}`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import moment from 'moment';
import { BehaviorSubject } from 'rxjs';
import { ByteSizeValue } from '@kbn/config-schema';

import type { CspConfigType } from '../../csp';
import { createHttpServer } from '../test_utils';
import { HttpService } from '../http_service';
import { HttpServerSetup } from '../http_server';
Expand Down Expand Up @@ -81,13 +80,10 @@ describe('core lifecycle handlers', () => {
}
if (path === 'csp') {
return new BehaviorSubject({
script_src: [],
worker_src: [],
style_src: [],
strict: false,
disableEmbedding: false,
warnLegacyBrowsers: true,
} as CspConfigType);
});
}
throw new Error(`Unexpected config path: ${path}`);
});
Expand Down
6 changes: 1 addition & 5 deletions src/core/server/http/test_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { HttpService } from './http_service';
import { CoreContext } from '../core_context';
import { getEnvOptions, configServiceMock } from '../config/mocks';
import { loggingSystemMock } from '../logging/logging_system.mock';
import type { CspConfigType } from '../csp';

const coreId = Symbol('core');
const env = Env.createDefault(REPO_ROOT, getEnvOptions());
Expand Down Expand Up @@ -58,13 +57,10 @@ configService.atPath.mockImplementation((path) => {
}
if (path === 'csp') {
return new BehaviorSubject({
script_src: [],
worker_src: [],
style_src: [],
strict: false,
disableEmbedding: false,
warnLegacyBrowsers: true,
} as CspConfigType);
});
}
throw new Error(`Unexpected config path: ${path}`);
});
Expand Down

0 comments on commit c74ada5

Please sign in to comment.