fix 1 test case
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ import { createSystemMetadataRouter } from './lib/createSystemMetadataRouter';
|
||||
* @alpha
|
||||
*/
|
||||
export const systemMetadataServiceFactory = createServiceFactory({
|
||||
service: coreServices.systemMetadataServiceRef,
|
||||
service: coreServices.systemMetadata,
|
||||
deps: {
|
||||
logger: coreServices.rootLogger,
|
||||
config: coreServices.rootConfig,
|
||||
|
||||
@@ -294,7 +294,7 @@ export namespace coreServices {
|
||||
* Read information about your current Backstage deployment.
|
||||
* @alpha
|
||||
*/
|
||||
export const systemMetadataServiceRef = createServiceRef<
|
||||
export const systemMetadata = createServiceRef<
|
||||
import('./SystemMetadataService').SystemMetadataService
|
||||
>({
|
||||
id: 'core.systemMetadata',
|
||||
|
||||
@@ -27,6 +27,7 @@ import { rootHealthServiceFactory } from '@backstage/backend-defaults/rootHealth
|
||||
import { rootHttpRouterServiceFactory } from '@backstage/backend-defaults/rootHttpRouter';
|
||||
import { rootLifecycleServiceFactory } from '@backstage/backend-defaults/rootLifecycle';
|
||||
import { urlReaderServiceFactory } from '@backstage/backend-defaults/urlReader';
|
||||
import { systemMetadataServiceFactory } from '@backstage/backend-defaults/systemMetadata';
|
||||
import {
|
||||
AuthService,
|
||||
BackstageCredentials,
|
||||
@@ -573,4 +574,19 @@ export namespace mockServices {
|
||||
rootInstanceMetadata,
|
||||
);
|
||||
}
|
||||
export namespace systemMetadata {
|
||||
/**
|
||||
* Creates a functional mock factory for the
|
||||
* {@link @backstage/backend-plugin-api#coreServices.systemMetadata}.
|
||||
*/
|
||||
export const factory = () => systemMetadataServiceFactory;
|
||||
/**
|
||||
* Creates a mock of the
|
||||
* {@link @backstage/backend-events-node#systemMetadata}, optionally
|
||||
* with some given method implementations.
|
||||
*/
|
||||
export const mock = simpleMock(coreServices.systemMetadata, () => ({
|
||||
introspect: jest.fn(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user