From 4b471cb97bcfddb2a0096472bf653edb9fbe1dd3 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Fri, 24 Sep 2021 13:28:32 +0300 Subject: [PATCH] fix Signed-off-by: Jari Kolehmainen --- src/main/__test__/lens-proxy.test.ts | 8 ++++---- src/main/lens-proxy.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/__test__/lens-proxy.test.ts b/src/main/__test__/lens-proxy.test.ts index 3f0b97d860..f7767fc685 100644 --- a/src/main/__test__/lens-proxy.test.ts +++ b/src/main/__test__/lens-proxy.test.ts @@ -23,7 +23,7 @@ import { isLongRunningRequest } from "../lens-proxy"; describe("isLongRunningRequest", () => { it("returns true on watches", () => { - ["watch=true", "watch=1"].forEach((param) => { + ["watch=true", "watch=1", "watch"].forEach((param) => { expect( isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`) ).toBeTruthy(); @@ -31,7 +31,7 @@ describe("isLongRunningRequest", () => { }); it("returns false on disabled watches", () => { - ["watch=false", "watch=0", "watch", ""].forEach((param) => { + ["watch=false", "watch=0", ""].forEach((param) => { expect( isLongRunningRequest(`/api/v1/namespaces/default/pods?${param}`) ).toBeFalsy(); @@ -39,7 +39,7 @@ describe("isLongRunningRequest", () => { }); it("returns true on follows", () => { - ["follow=true", "follow=1"].forEach((param) => { + ["follow=true", "follow=1", "follow"].forEach((param) => { expect( isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`) ).toBeTruthy(); @@ -47,7 +47,7 @@ describe("isLongRunningRequest", () => { }); it("returns false on disabled follows", () => { - ["follow=false", "follow=0", "follow", ""].forEach((param) => { + ["follow=false", "follow=0", ""].forEach((param) => { expect( isLongRunningRequest(`/api/v1/namespaces/default/pods/foo/log?${param}`) ).toBeFalsy(); diff --git a/src/main/lens-proxy.ts b/src/main/lens-proxy.ts index 7d6a703270..72646f1717 100644 --- a/src/main/lens-proxy.ts +++ b/src/main/lens-proxy.ts @@ -40,7 +40,7 @@ export interface LensProxyFunctions { kubeApiRequest: (args: ProxyApiRequestArgs) => void | Promise; } -const truthyParams = ["1", "true"]; +const truthyParams = ["1", "true", ""]; const watchParam = "watch"; const followParam = "follow";