From 178d4b69d0f53f1a79427c5dab231a203c007900 Mon Sep 17 00:00:00 2001 From: Matteo Silvestri Date: Thu, 1 Sep 2022 12:42:53 +0200 Subject: [PATCH] fix linting Signed-off-by: Matteo Silvestri --- .../src/util/KubernetesContainerRunner.test.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/backend-common/src/util/KubernetesContainerRunner.test.ts b/packages/backend-common/src/util/KubernetesContainerRunner.test.ts index 081b05a4b6..d914bc7742 100644 --- a/packages/backend-common/src/util/KubernetesContainerRunner.test.ts +++ b/packages/backend-common/src/util/KubernetesContainerRunner.test.ts @@ -112,7 +112,7 @@ describeIfKubernetes('KubernetesContainerRunner', () => { '/notWorkdir/app': '/app', }, }; - await expect(containerRunner.runContainer(runOptions)).rejects.toThrowError( + await expect(containerRunner.runContainer(runOptions)).rejects.toThrow( `Mounted '${hostDir}' dir should be subdirectories of '${ options!.mountBase!.basePath }`, @@ -151,7 +151,7 @@ describeIfKubernetes('KubernetesContainerRunner', () => { imageName: 'alpine', args: ['sleep', '10'], }; - await expect(containerRunner.runContainer(runOptions)).rejects.toThrowError( + await expect(containerRunner.runContainer(runOptions)).rejects.toThrow( `Failed to complete in ${options.timeoutMs} ms`, ); }); @@ -167,7 +167,7 @@ describeIfKubernetes('KubernetesContainerRunner', () => { imageName: 'alpine', args: ['fake'], }; - await expect(containerRunner.runContainer(runOptions)).rejects.toThrowError( + await expect(containerRunner.runContainer(runOptions)).rejects.toThrow( `Container execution failed`, ); }); @@ -183,7 +183,7 @@ describeIfKubernetes('KubernetesContainerRunner', () => { imageName: 'golang:1.17', args: ['echo', 'hello world'], }; - await expect(containerRunner.runContainer(runOptions)).rejects.toThrowError( + await expect(containerRunner.runContainer(runOptions)).rejects.toThrow( 'Kubernetes Job creation failed with the following error message: namespaces "fake" not found', ); }); @@ -221,9 +221,7 @@ describeIfKubernetes('KubernetesContainerRunner', () => { imageName: 'golang:1.17', args: ['echo', 'hello world'], }; - await expect( - containerRunner.runContainer(runOptions), - ).rejects.toThrowError( + await expect(containerRunner.runContainer(runOptions)).rejects.toThrow( 'Kubernetes watch request failed with the following error message: Error: Forbidden', ); });