From f51f2173e73a574624f88d02edc940262e350a76 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 24 Nov 2022 08:43:37 -0500 Subject: [PATCH] Fix tests Signed-off-by: Sebastian Malton --- src/common/k8s-api/__tests__/kube-api.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/k8s-api/__tests__/kube-api.test.ts b/src/common/k8s-api/__tests__/kube-api.test.ts index 9244d5e6ab..4f67ed1401 100644 --- a/src/common/k8s-api/__tests__/kube-api.test.ts +++ b/src/common/k8s-api/__tests__/kube-api.test.ts @@ -592,7 +592,7 @@ describe("KubeApi", () => { it("requests the watch", () => { expect(fetchMock.mock.lastCall).toMatchObject([ - "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", + "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600", { headers: { "content-type": "application/json", @@ -606,7 +606,7 @@ describe("KubeApi", () => { beforeEach(async () => { await fetchMock.resolveSpecific( ([url, init]) => { - const isMatch = url === "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion="; + const isMatch = url === "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600"; if (isMatch) { init?.signal?.addEventListener("abort", () => { @@ -616,7 +616,7 @@ describe("KubeApi", () => { return isMatch; }, - createMockResponseFromStream("http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", stream), + createMockResponseFromStream("http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600", stream), ); }); @@ -688,7 +688,7 @@ describe("KubeApi", () => { it("requests the watch", () => { expect(fetchMock.mock.lastCall).toMatchObject([ - "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", + "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600", { headers: { "content-type": "application/json", @@ -702,7 +702,7 @@ describe("KubeApi", () => { beforeEach(async () => { await fetchMock.resolveSpecific( ([url, init]) => { - const isMatch = url === "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion="; + const isMatch = url === "http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600"; if (isMatch) { init?.signal?.addEventListener("abort", () => { @@ -712,7 +712,7 @@ describe("KubeApi", () => { return isMatch; }, - createMockResponseFromStream("http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", stream), + createMockResponseFromStream("http://127.0.0.1:9999/api-kube/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=&timeoutSeconds=600", stream), ); });