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

Fix only tests that rely on bad formatting of resources

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-10 15:36:06 -05:00
parent 76de26695e
commit 176e1960c8

View File

@ -69,7 +69,7 @@ describe("<ClusterFrame />", () => {
describe("given cluster with list nodes and namespaces permissions", () => { describe("given cluster with list nodes and namespaces permissions", () => {
beforeEach(() => { beforeEach(() => {
// TODO: replace with not using private info // TODO: replace with not using private info
(cluster as any).allowedResources.replace(["v1/nodes", "v1/namespaces"]); (cluster as unknown as { readonly allowedResources: Cluster["allowedResources"] }).allowedResources.replace(["nodes", "namespaces"]);
}); });
it("renders", () => { it("renders", () => {
@ -110,7 +110,7 @@ describe("<ClusterFrame />", () => {
describe("given cluster without list nodes, but with namespaces permissions", () => { describe("given cluster without list nodes, but with namespaces permissions", () => {
beforeEach(() => { beforeEach(() => {
(cluster as any).allowedResources.replace(["v1/namespaces"]); (cluster as unknown as { readonly allowedResources: Cluster["allowedResources"] }).allowedResources.replace(["namespaces"]);
}); });
it("renders", () => { it("renders", () => {