backend-test-utils: renamed service dir to services + internal renames
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -15,4 +15,4 @@
|
||||
*/
|
||||
|
||||
export * from './wiring';
|
||||
export * from './implementations';
|
||||
export * from './services';
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import {
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import type { mockServices } from './mockServices';
|
||||
|
||||
export class MockLogger implements RootLoggerService {
|
||||
export class MockRootLoggerService implements RootLoggerService {
|
||||
#levels: Exclude<mockServices.rootLogger.Options['levels'], boolean>;
|
||||
#meta: LogMeta;
|
||||
|
||||
@@ -42,7 +42,7 @@ export class MockLogger implements RootLoggerService {
|
||||
}
|
||||
|
||||
child(meta: LogMeta): LoggerService {
|
||||
return new MockLogger(this.#levels, { ...this.#meta, ...meta });
|
||||
return new MockRootLoggerService(this.#levels, { ...this.#meta, ...meta });
|
||||
}
|
||||
|
||||
constructor(
|
||||
+3
-3
@@ -36,8 +36,8 @@ import {
|
||||
} from '@backstage/backend-app-api';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { MockIdentityService } from './mockIdentityService';
|
||||
import { MockLogger } from './mockRootLoggerService';
|
||||
import { MockIdentityService } from './MockIdentityService';
|
||||
import { MockRootLoggerService } from './MockRootLoggerService';
|
||||
|
||||
function simpleFactory<TService, TOptions extends [options?: object] = []>(
|
||||
ref: ServiceRef<TService>,
|
||||
@@ -67,7 +67,7 @@ export namespace mockServices {
|
||||
}
|
||||
|
||||
export function rootLogger(options?: rootLogger.Options): LoggerService {
|
||||
return new MockLogger(options?.levels ?? false, {});
|
||||
return new MockRootLoggerService(options?.levels ?? false, {});
|
||||
}
|
||||
export namespace rootLogger {
|
||||
export type Options = {
|
||||
@@ -31,8 +31,7 @@ import {
|
||||
ExtensionPoint,
|
||||
coreServices,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
|
||||
import { mockServices } from '../implementations';
|
||||
import { mockServices } from '../services';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import express from 'express';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user