update mock

Signed-off-by: Matthew Clarke <mclarke@spotify.com>
This commit is contained in:
Matthew Clarke
2022-09-15 22:10:42 -04:00
parent 0768d6dece
commit 3da0c9a181
+15
View File
@@ -24,7 +24,9 @@ import {
KubernetesApi,
} from '../src';
import {
CustomResourceMatcher,
FetchResponse,
KubernetesRequestAuth,
ObjectsByEntityResponse,
} from '@backstage/plugin-kubernetes-common';
import fixture1 from '../src/__fixtures__/1-deployments.json';
@@ -59,6 +61,19 @@ class MockKubernetesClient implements KubernetesApi {
({ type: type.toLocaleLowerCase('en-US'), resources } as FetchResponse),
);
}
async getWorkloadsByEntity(
_auth: KubernetesRequestAuth,
_entity: Entity,
): Promise<ObjectsByEntityResponse> {
throw new Error('Method not implemented.');
}
async getCustomObjectsByEntity(
_auth: KubernetesRequestAuth,
_customResources: CustomResourceMatcher[],
entity: Entity,
): Promise<ObjectsByEntityResponse> {
throw new Error('Method not implemented.');
}
async getObjectsByEntity(): Promise<ObjectsByEntityResponse> {
return {