Skip to content

Commit

Permalink
fix: container test should not run app vulns scan by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-agabani-snyk committed Oct 6, 2020
1 parent 2fae1cb commit b62c1c0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion src/cli/modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const modes: Record<string, ModeData> = {
config: (args): [] => {
args['docker'] = true;
args['experimental'] = true;
args['app-vulns'] = args.json ? false : true;

return args;
},
Expand Down
27 changes: 0 additions & 27 deletions test/modes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -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', () => {
Expand Down

0 comments on commit b62c1c0

Please sign in to comment.