mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix pods.store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
0ac6b48bf4
commit
fa9683a170
@ -4,7 +4,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Pod } from "../../../common/k8s-api/endpoints";
|
import { Pod } from "../../../common/k8s-api/endpoints";
|
||||||
import { podStore } from "../+workloads-pods/legacy-store";
|
import type { PodStore } from "../+workloads-pods/store";
|
||||||
|
import podStoreInjectable from "../+workloads-pods/store.injectable";
|
||||||
|
import createStoresAndApisInjectable from "../../create-stores-apis.injectable";
|
||||||
|
import { getDiForUnitTesting } from "../../getDiForUnitTesting";
|
||||||
|
|
||||||
const runningPod = new Pod({
|
const runningPod = new Pod({
|
||||||
apiVersion: "foo",
|
apiVersion: "foo",
|
||||||
@ -111,6 +114,16 @@ const succeededPod = new Pod({
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("Pod Store tests", () => {
|
describe("Pod Store tests", () => {
|
||||||
|
let podStore: PodStore;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||||
|
|
||||||
|
di.override(createStoresAndApisInjectable, () => true);
|
||||||
|
|
||||||
|
podStore = di.inject(podStoreInjectable);
|
||||||
|
});
|
||||||
|
|
||||||
it("gets Pod statuses in proper sorting order", () => {
|
it("gets Pod statuses in proper sorting order", () => {
|
||||||
const statuses = Object.entries(podStore.getStatuses([
|
const statuses = Object.entries(podStore.getStatuses([
|
||||||
pendingPod,
|
pendingPod,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user