kubernetes-backend: fix test data
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -45,6 +45,9 @@ const entities: Entity[] = [
|
||||
title: 'title',
|
||||
namespace: 'default',
|
||||
},
|
||||
spec: {
|
||||
type: 'kubernetes-cluster',
|
||||
},
|
||||
},
|
||||
{
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
@@ -63,6 +66,9 @@ const entities: Entity[] = [
|
||||
name: 'owned',
|
||||
namespace: 'default',
|
||||
},
|
||||
spec: {
|
||||
type: 'kubernetes-cluster',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
*/
|
||||
|
||||
import { Config, ConfigReader } from '@backstage/config';
|
||||
import { ANNOTATION_KUBERNETES_AUTH_PROVIDER } from '@backstage/plugin-kubernetes-common';
|
||||
import {
|
||||
ANNOTATION_KUBERNETES_API_SERVER,
|
||||
ANNOTATION_KUBERNETES_API_SERVER_CA,
|
||||
ANNOTATION_KUBERNETES_AUTH_PROVIDER,
|
||||
} from '@backstage/plugin-kubernetes-common';
|
||||
import { getCombinedClusterSupplier } from './index';
|
||||
import { ClusterDetails } from '../types/types';
|
||||
import { AuthenticationStrategy, DispatchStrategy } from '../auth';
|
||||
@@ -146,7 +150,22 @@ describe('getCombinedClusterSupplier', () => {
|
||||
const clusterSupplier = getCombinedClusterSupplier(
|
||||
config,
|
||||
catalogServiceMock({
|
||||
entities: [{ metadata: { annotations: {}, name: 'cluster' } } as any],
|
||||
entities: [
|
||||
{
|
||||
kind: 'Resource',
|
||||
metadata: {
|
||||
name: 'cluster',
|
||||
annotations: {
|
||||
[ANNOTATION_KUBERNETES_API_SERVER]: 'mock',
|
||||
[ANNOTATION_KUBERNETES_API_SERVER_CA]: 'mock',
|
||||
[ANNOTATION_KUBERNETES_AUTH_PROVIDER]: 'mock',
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
type: 'kubernetes-cluster',
|
||||
},
|
||||
} as any,
|
||||
],
|
||||
}),
|
||||
mockStrategy,
|
||||
logger,
|
||||
|
||||
Reference in New Issue
Block a user