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

[Reporting/Server] register plugin routes synchronously #68976

Merged
merged 15 commits into from
Jun 15, 2020
Merged
Prev Previous commit
Next Next commit
Fix generation tests
Joel Griffith committed Jun 15, 2020
commit a7bae6880ddfc320f221afbce69903e06aab7e3f
4 changes: 3 additions & 1 deletion x-pack/plugins/reporting/server/routes/generation.test.ts
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ import { of } from 'rxjs';
type setupServerReturn = UnwrapPromise<ReturnType<typeof setupServer>>;

describe('POST /api/reporting/generate', () => {
const reportingSymbol = Symbol('reporting');
let server: setupServerReturn['server'];
let httpSetup: setupServerReturn['httpSetup'];
let exportTypesRegistry: ExportTypesRegistry;
@@ -47,7 +48,8 @@ describe('POST /api/reporting/generate', () => {
} as unknown) as jest.Mocked<LevelLogger>;

beforeEach(async () => {
({ server, httpSetup } = await setupServer());
({ server, httpSetup } = await setupServer(reportingSymbol));
httpSetup.registerRouteHandlerContext(reportingSymbol, 'reporting', () => ({}));
const mockDeps = ({
elasticsearch: {
legacy: {