mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Linter fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
5be6270ce5
commit
6ae027bde3
@ -76,7 +76,7 @@ class NonInjectedNodeDetails extends React.Component<NodeDetailsProps & Dependen
|
|||||||
this.props.podStore.loadAll({
|
this.props.podStore.loadAll({
|
||||||
namespaces: [...this.props.namespaceStore.getItems().map(ns => ns.getName())],
|
namespaces: [...this.props.namespaceStore.getItems().map(ns => ns.getName())],
|
||||||
onLoadFailure: error =>
|
onLoadFailure: error =>
|
||||||
this.props.showErrorNotification(`Can not load Pods. ${String(error)}`)
|
this.props.showErrorNotification(`Can not load Pods. ${String(error)}`),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ export const NodeDetails = withInjectables<Dependencies, NodeDetailsProps>(NonIn
|
|||||||
namespaceStore: di.inject(namespaceStoreInjectable),
|
namespaceStore: di.inject(namespaceStoreInjectable),
|
||||||
getActiveClusterEntity: di.inject(getActiveClusterEntityInjectable),
|
getActiveClusterEntity: di.inject(getActiveClusterEntityInjectable),
|
||||||
requestClusterMetricsByNodeNames: di.inject(requestClusterMetricsByNodeNamesInjectable),
|
requestClusterMetricsByNodeNames: di.inject(requestClusterMetricsByNodeNamesInjectable),
|
||||||
showErrorNotification: di.inject(showErrorNotificationInjectable)
|
showErrorNotification: di.inject(showErrorNotificationInjectable),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -9,11 +9,13 @@ import type { DiContainer } from "@ogre-tools/injectable";
|
|||||||
import { fireEvent } from "@testing-library/react";
|
import { fireEvent } from "@testing-library/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import directoryForLensLocalStorageInjectable from "../../../../common/directory-for-lens-local-storage/directory-for-lens-local-storage.injectable";
|
import directoryForLensLocalStorageInjectable from "../../../../common/directory-for-lens-local-storage/directory-for-lens-local-storage.injectable";
|
||||||
import fetchInjectable, { Fetch } from "../../../../common/fetch/fetch.injectable";
|
import type { Fetch } from "../../../../common/fetch/fetch.injectable";
|
||||||
|
import fetchInjectable from "../../../../common/fetch/fetch.injectable";
|
||||||
import { Pod } from "../../../../common/k8s-api/endpoints";
|
import { Pod } from "../../../../common/k8s-api/endpoints";
|
||||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||||
import storesAndApisCanBeCreatedInjectable from "../../../stores-apis-can-be-created.injectable";
|
import storesAndApisCanBeCreatedInjectable from "../../../stores-apis-can-be-created.injectable";
|
||||||
import { DiRender, renderFor } from "../../test-utils/renderFor";
|
import type { DiRender } from "../../test-utils/renderFor";
|
||||||
|
import { renderFor } from "../../test-utils/renderFor";
|
||||||
import { PodDetailsList } from "../pod-details-list";
|
import { PodDetailsList } from "../pod-details-list";
|
||||||
import type { PodStore } from "../store";
|
import type { PodStore } from "../store";
|
||||||
import podStoreInjectable from "../store.injectable";
|
import podStoreInjectable from "../store.injectable";
|
||||||
@ -132,7 +134,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
const result = render(
|
const result = render(
|
||||||
<PodDetailsList
|
<PodDetailsList
|
||||||
pods={[]}
|
pods={[]}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result.container).toMatchSnapshot();
|
expect(result.container).toMatchSnapshot();
|
||||||
@ -142,7 +144,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
const result = render(
|
const result = render(
|
||||||
<PodDetailsList
|
<PodDetailsList
|
||||||
pods={[]}
|
pods={[]}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result.getByText("No items found")).toBeInTheDocument();
|
expect(result.getByText("No items found")).toBeInTheDocument();
|
||||||
@ -154,7 +156,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
const result = render(
|
const result = render(
|
||||||
<PodDetailsList
|
<PodDetailsList
|
||||||
pods={[]}
|
pods={[]}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result.container).toMatchSnapshot();
|
expect(result.container).toMatchSnapshot();
|
||||||
@ -174,7 +176,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
failedPod,
|
failedPod,
|
||||||
pendingPod,
|
pendingPod,
|
||||||
]}
|
]}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result.container).toMatchSnapshot();
|
expect(result.container).toMatchSnapshot();
|
||||||
@ -198,8 +200,8 @@ describe("<PodDetailsList />", () => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
cpu,
|
cpu,
|
||||||
memory
|
memory,
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -213,7 +215,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
]}
|
]}
|
||||||
maxCpu={1}
|
maxCpu={1}
|
||||||
maxMemory={2048}
|
maxMemory={2048}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result.container).toMatchSnapshot();
|
expect(result.container).toMatchSnapshot();
|
||||||
@ -229,7 +231,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
]}
|
]}
|
||||||
maxCpu={1}
|
maxCpu={1}
|
||||||
maxMemory={2048}
|
maxMemory={2048}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
const column = result.getByText("Name");
|
const column = result.getByText("Name");
|
||||||
@ -250,7 +252,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
]}
|
]}
|
||||||
maxCpu={1}
|
maxCpu={1}
|
||||||
maxMemory={2048}
|
maxMemory={2048}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
const column = result.getByText("CPU");
|
const column = result.getByText("CPU");
|
||||||
@ -271,7 +273,7 @@ describe("<PodDetailsList />", () => {
|
|||||||
]}
|
]}
|
||||||
maxCpu={1}
|
maxCpu={1}
|
||||||
maxMemory={2048}
|
maxMemory={2048}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
const column = result.getByText("Memory");
|
const column = result.getByText("Memory");
|
||||||
@ -283,4 +285,4 @@ describe("<PodDetailsList />", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -226,4 +226,4 @@ export const PodDetailsList = withInjectables<Dependencies, PodDetailsListProps>
|
|||||||
getDetailsUrl: di.inject(getDetailsUrlInjectable),
|
getDetailsUrl: di.inject(getDetailsUrlInjectable),
|
||||||
podStore: di.inject(podStoreInjectable),
|
podStore: di.inject(podStoreInjectable),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user