From ffc047713321fe665d159e9084329ff6a0344a8b Mon Sep 17 00:00:00 2001 From: David Gamero Date: Thu, 25 Jul 2024 19:31:19 +0000 Subject: [PATCH] prettier --- src/types/kubectl.test.ts | 65 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/types/kubectl.test.ts b/src/types/kubectl.test.ts index f9c955048..a8ff9f423 100644 --- a/src/types/kubectl.test.ts +++ b/src/types/kubectl.test.ts @@ -1,4 +1,4 @@ -import { getKubectlPath, Kubectl } from './kubectl' +import {getKubectlPath, Kubectl} from './kubectl' import * as exec from '@actions/exec' import * as io from '@actions/io' import * as core from '@actions/core' @@ -39,10 +39,9 @@ const testNamespace = 'testNamespace' const defaultNamespace = 'default' const otherNamespace = 'otherns' describe('Kubectl class', () => { - describe('with a success exec return in testNamespace', () => { const kubectl = new Kubectl(kubectlPath, testNamespace) - const execReturn = { exitCode: 0, stdout: 'Output', stderr: '' } + const execReturn = {exitCode: 0, stdout: 'Output', stderr: ''} beforeEach(() => { jest.spyOn(exec, 'getExecOutput').mockImplementation(async () => { @@ -57,7 +56,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['apply', '-f', configPaths, '--namespace', testNamespace], - { silent: false } + {silent: false} ) }) @@ -74,7 +73,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) }) @@ -92,7 +91,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) }) @@ -110,7 +109,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // overrided ns @@ -130,7 +129,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent } + {silent} ) }) @@ -148,7 +147,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: true } + {silent: true} ) // overrided ns @@ -168,7 +167,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent } + {silent} ) }) @@ -193,7 +192,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // override ns @@ -214,7 +213,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -234,7 +233,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // override ns @@ -250,7 +249,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -270,7 +269,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // override ns @@ -286,7 +285,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -306,7 +305,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) await kubectl.labelFiles(file, labels, otherNamespace) @@ -321,7 +320,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -341,7 +340,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) await kubectl.labelFiles(files, labels, otherNamespace) @@ -356,7 +355,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -365,7 +364,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['get', 'pods', '-o', 'json', '--namespace', testNamespace], - { silent: true } + {silent: true} ) }) @@ -384,7 +383,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // override ns @@ -398,7 +397,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent: false } + {silent: false} ) }) @@ -416,7 +415,7 @@ describe('Kubectl class', () => { '--namespace', testNamespace ], - { silent: false } + {silent: false} ) // override ns @@ -432,7 +431,7 @@ describe('Kubectl class', () => { '--namespace', otherNamespace ], - { silent } + {silent} ) }) @@ -443,7 +442,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, [command, '--namespace', testNamespace], - { silent: false } + {silent: false} ) // with args @@ -452,7 +451,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, [command, args, '--namespace', testNamespace], - { silent: false } + {silent: false} ) }) @@ -462,7 +461,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['delete', arg, '--namespace', testNamespace], - { silent: false } + {silent: false} ) // override ns @@ -470,7 +469,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['delete', arg, '--namespace', otherNamespace], - { silent: false } + {silent: false} ) }) @@ -480,7 +479,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['delete', ...args, '--namespace', testNamespace], - { silent: false } + {silent: false} ) // override ns @@ -488,7 +487,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, ['delete', ...args, '--namespace', otherNamespace], - { silent: false } + {silent: false} ) }) }) @@ -518,7 +517,7 @@ describe('Kubectl class', () => { const kubectl = new Kubectl(kubectlPath, testNamespace, skipTls) jest.spyOn(exec, 'getExecOutput').mockImplementation(async () => { - return { exitCode: 0, stderr: '', stdout: '' } + return {exitCode: 0, stderr: '', stdout: ''} }) const command = 'command' @@ -526,7 +525,7 @@ describe('Kubectl class', () => { expect(exec.getExecOutput).toBeCalledWith( kubectlPath, [command, '--insecure-skip-tls-verify', '--namespace', testNamespace], - { silent: false } + {silent: false} ) const kubectlNoFlags = new Kubectl(kubectlPath)