Skip to content

Commit

Permalink
Merge branch 'eero/fixup-dep-scanner' into 'master'
Browse files Browse the repository at this point in the history
Fixup dependency scanner for upcoming upgrade

This begins to fail after upgrading the build container in https://gitlab.com/dfinity-lab/public/ic/-/merge_requests/19059 with:
```
FAILED dependencies/scanner/manager/npm_dependency_manager_test.py::<TEST> - AttributeError: 'NPMDependencyManager' object has no attribute 'fake_audit_type'
``` 

See merge request dfinity-lab/public/ic!19280
  • Loading branch information
Bownairo committed May 15, 2024
2 parents 0100cda + 34e12a9 commit 4b9600e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ def test_findings_helper_no_vulnerabilities(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(1)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings
Expand All @@ -567,8 +567,8 @@ def test_findings_helper_one_finding(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(2)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert len(findings) == 1
Expand Down Expand Up @@ -617,8 +617,8 @@ def test_findings_helper_vulnerable_dependency_not_in_range(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(3)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings
Expand All @@ -628,8 +628,8 @@ def test_findings_helper_transitive_vulnerability(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(4)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings

0 comments on commit 4b9600e

Please sign in to comment.