From b62c1c04d7640c4f9da0195bf6de46ed93604147 Mon Sep 17 00:00:00 2001 From: Ahmed Agabani <70949530+ahmed-agabani-snyk@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:48:34 +0100 Subject: [PATCH] fix: container test should not run app vulns scan by default --- src/cli/modes.ts | 1 - test/modes.spec.ts | 27 --------------------------- 2 files changed, 28 deletions(-) diff --git a/src/cli/modes.ts b/src/cli/modes.ts index a9e94928b9..76ec9adee1 100644 --- a/src/cli/modes.ts +++ b/src/cli/modes.ts @@ -19,7 +19,6 @@ const modes: Record = { config: (args): [] => { args['docker'] = true; args['experimental'] = true; - args['app-vulns'] = args.json ? false : true; return args; }, diff --git a/test/modes.spec.ts b/test/modes.spec.ts index 85470e7d1c..c00c239569 100644 --- a/test/modes.spec.ts +++ b/test/modes.spec.ts @@ -118,7 +118,6 @@ describe('when have a valid mode and command', () => { _: [], docker: true, experimental: true, - 'app-vulns': true, 'package-manager': 'pip', }; const cliCommand = 'container'; @@ -160,7 +159,6 @@ describe('when have a valid mode, command and exists a command alias', () => { _: [], docker: true, experimental: true, - 'app-vulns': true, 'package-manager': 'pip', }; const cliCommand = 'container'; @@ -176,31 +174,6 @@ describe('when have a valid mode, command and exists a command alias', () => { expect(cliArgs['docker']).toBeTruthy(); expect(cliArgs['experimental']).toBeTruthy(); }); - - it('"container test" should set docker option and not app-vulns and test command', () => { - const expectedCommand = 't'; - const expectedArgs = { - _: [], - json: true, - docker: true, - experimental: true, - 'app-vulns': false, - 'package-manager': 'pip', - }; - const cliCommand = 'container'; - const cliArgs = { - _: ['t'], - json: true, - 'package-manager': 'pip', - }; - - const command = parseMode(cliCommand, cliArgs); - - expect(command).toBe(expectedCommand); - expect(cliArgs).toEqual(expectedArgs); - expect(cliArgs['docker']).toBeTruthy(); - expect(cliArgs['experimental']).toBeTruthy(); - }); }); describe('when have a valid mode and not allowed command', () => {