-
Notifications
You must be signed in to change notification settings - Fork 556
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: propagate failed scans with --all-projects #1301
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,10 +171,14 @@ export const AllProjectsTests: AcceptanceTests = { | |
utils.chdirWorkspaces(); | ||
const spyPlugin = sinon.spy(params.plugins, 'loadPlugin'); | ||
t.teardown(spyPlugin.restore); | ||
|
||
const result = await params.cli.monitor('monorepo-bad-project', { | ||
allProjects: true, | ||
}); | ||
let result; | ||
try { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these were not previously propagated up if dependencies failed to be detected, but we do fail if one of the paths fails to be scanned so this aligns that behaviour. This may however start failing some pipelines that previously were skipping the failures. How can this be communicated & is this the desired behaviour right? You want to know something you monitored failed and it did not pass. |
||
await params.cli.monitor('monorepo-bad-project', { | ||
allProjects: true, | ||
}); | ||
} catch (error) { | ||
result = error.message; | ||
} | ||
t.ok(spyPlugin.withArgs('rubygems').calledOnce, 'calls rubygems plugin'); | ||
t.ok(spyPlugin.withArgs('yarn').calledOnce, 'calls npm plugin'); | ||
t.ok(spyPlugin.withArgs('maven').notCalled, 'did not call maven plugin'); | ||
|
@@ -184,11 +188,10 @@ export const AllProjectsTests: AcceptanceTests = { | |
'rubygems/graph/some/project-id', | ||
'rubygems project was monitored', | ||
); | ||
|
||
t.notMatch( | ||
t.match( | ||
result, | ||
'yarn/graph/some/project-id', | ||
'yarn project was not monitored', | ||
'Dependency snyk was not found in yarn.lock', | ||
'yarn project had an error and we displayed it', | ||
); | ||
|
||
const request = params.server.popRequest(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved a little further down unchanged