1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix kube-object.store.test.ts typing

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-05-04 09:30:47 -04:00
parent 80f6ac475a
commit 5e47d1ff3b

View File

@ -3,6 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import type { Cluster } from "../../cluster/cluster";
import type { ClusterContext } from "../cluster-context"; import type { ClusterContext } from "../cluster-context";
import type { KubeApi } from "../kube-api"; import type { KubeApi } from "../kube-api";
import { KubeObject } from "../kube-object"; import { KubeObject } from "../kube-object";
@ -14,6 +15,7 @@ class FakeKubeObjectStore extends KubeObjectStore<KubeObject> {
allNamespaces: [], allNamespaces: [],
contextNamespaces: [], contextNamespaces: [],
hasSelectedAll: false, hasSelectedAll: false,
cluster: {} as Cluster,
} as ClusterContext; } as ClusterContext;
get context() { get context() {
@ -40,6 +42,7 @@ describe("KubeObjectStore", () => {
resourceVersion: "1", resourceVersion: "1",
uid: "some-uid", uid: "some-uid",
namespace: "default", namespace: "default",
selfLink: "/some/self/link",
}, },
}); });
const store = new FakeKubeObjectStore(loadItems, { const store = new FakeKubeObjectStore(loadItems, {
@ -73,6 +76,7 @@ describe("KubeObjectStore", () => {
resourceVersion: "1", resourceVersion: "1",
uid: "some-uid", uid: "some-uid",
namespace: "default", namespace: "default",
selfLink: "/some/self/link",
}, },
}); });
const objNotInDefaultNamespace = new KubeObject({ const objNotInDefaultNamespace = new KubeObject({
@ -83,6 +87,7 @@ describe("KubeObjectStore", () => {
resourceVersion: "1", resourceVersion: "1",
uid: "some-uid", uid: "some-uid",
namespace: "not-default", namespace: "not-default",
selfLink: "/some/self/link",
}, },
}); });
const store = new FakeKubeObjectStore(loadItems, { const store = new FakeKubeObjectStore(loadItems, {
@ -115,6 +120,7 @@ describe("KubeObjectStore", () => {
name: "some-obj-name", name: "some-obj-name",
resourceVersion: "1", resourceVersion: "1",
uid: "some-uid", uid: "some-uid",
selfLink: "/some/self/link",
}, },
}); });
const clusterScopedObject2 = new KubeObject({ const clusterScopedObject2 = new KubeObject({
@ -125,6 +131,7 @@ describe("KubeObjectStore", () => {
resourceVersion: "1", resourceVersion: "1",
uid: "some-uid", uid: "some-uid",
namespace: "not-default", namespace: "not-default",
selfLink: "/some/self/link",
}, },
}); });
const store = new FakeKubeObjectStore(loadItems, { const store = new FakeKubeObjectStore(loadItems, {