remove usages of some backend-common helpers
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import {
|
||||
startTestBackend,
|
||||
} from '@backstage/backend-test-utils';
|
||||
import { appPlugin } from './appPlugin';
|
||||
import { createRootLogger } from '@backstage/backend-common';
|
||||
import { overridePackagePathResolution } from '@backstage/backend-plugin-api/testUtils';
|
||||
|
||||
const mockDir = createMockDirectory();
|
||||
@@ -29,9 +28,6 @@ overridePackagePathResolution({
|
||||
path: mockDir.path,
|
||||
});
|
||||
|
||||
// Make sure root logger is initialized ahead of FS mock
|
||||
createRootLogger();
|
||||
|
||||
describe('appPlugin', () => {
|
||||
afterEach(() => {
|
||||
mockDir.clear();
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { notFoundHandler } from '@backstage/backend-common';
|
||||
import {
|
||||
DatabaseService,
|
||||
resolvePackagePath,
|
||||
@@ -22,7 +21,7 @@ import {
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { AppConfig } from '@backstage/config';
|
||||
import helmet from 'helmet';
|
||||
import express from 'express';
|
||||
import express, { Request, Response } from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
@@ -299,7 +298,9 @@ async function createEntryPointRouter({
|
||||
if (staticFallbackHandler) {
|
||||
staticRouter.use(staticFallbackHandler);
|
||||
}
|
||||
staticRouter.use(notFoundHandler());
|
||||
staticRouter.use((_req: Request, res: Response) => {
|
||||
res.status(404).end();
|
||||
});
|
||||
|
||||
router.use('/static', staticRouter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user