Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: container test should not run app vulns scan by default #1445

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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