Fix not being able to remove role bindings via the UI (#4394)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-30 09:06:54 -05:00
1 parent 2ab9aeb83c
commit df46dd9ef6
3 files changed
+60 -25

No files matched your search

+10 -4
View File
@@ -133,7 +133,10 @@ describe("KubeApi", () => {
checkPreferredVersion: true,
});
await kubeApi.get();
await kubeApi.get({
name: "foo",
namespace: "default",
});
expect(kubeApi.apiPrefix).toEqual("/apis");
expect(kubeApi.apiGroup).toEqual("networking.k8s.io");
});
@@ -173,7 +176,10 @@ describe("KubeApi", () => {
checkPreferredVersion: true,
});
await kubeApi.get();
await kubeApi.get({
name: "foo",
namespace: "default",
});
expect(kubeApi.apiPrefix).toEqual("/apis");
expect(kubeApi.apiGroup).toEqual("extensions");
});
@@ -312,7 +318,7 @@ describe("KubeApi", () => {
(fetch as any).mockResponse(async () => {
return {};
});
api.watch({ namespace: "kube-system" });
expect(spy).toHaveBeenCalledWith("/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", expect.anything(), expect.anything());
});
@@ -323,7 +329,7 @@ describe("KubeApi", () => {
(fetch as any).mockResponse(async () => {
return {};
});
api.watch({ namespace: "kube-system", timeout: 60 });
expect(spy).toHaveBeenCalledWith("/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", { query: { timeoutSeconds: 60 }}, expect.anything());
});