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

chore: use generic GH urls in tests/test_cve.py #145

Merged
merged 1 commit into from
Oct 31, 2023
Merged
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
16 changes: 5 additions & 11 deletions tests/test_cve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,12 +1567,6 @@ def test_cveFromUrl(self):
year = datetime.datetime.now().year
tsts = [
# valid
(
"https://github.com/influxdata/idpe/issues/5519",
"CVE-%s-GH5519#idpe" % year,
"influxdata",
None,
),
(
"https://github.com/foo/bar/issues/1",
"CVE-%s-GH1#bar" % year,
Expand Down Expand Up @@ -1606,10 +1600,10 @@ def test_cveFromUrl(self):
"unsupported url: 'https://launchpad.net/bugs/1234' (only support github)",
),
(
"https://github.com/influxdata/idpe/pull/6238",
"https://github.com/foo/bar/pull/2",
None,
None,
"invalid url: 'https://github.com/influxdata/idpe/pull/6238' (only support github issues)",
"invalid url: 'https://github.com/foo/bar/pull/2' (only support github issues)",
),
(
"https://github.com/foo/%s/issues/1" % ("a" * 51),
Expand Down Expand Up @@ -2192,7 +2186,7 @@ def test_checkSyntax(self):
advisory: https://github.com/advisories/GHSA-xg2h-wx96-xgxr
severity: medium
status: needed
url: https://github.com/influxdata/foo/security/dependabot/1
url: https://github.com/foo/bar/security/dependabot/1
"""
content = tests.testutil.cveContentFromDict(tmpl)
cve_fn = os.path.join(cveDirs["retired"], "CVE-1234-5678")
Expand Down Expand Up @@ -2224,7 +2218,7 @@ def test_checkSyntax(self):
advisory: https://github.com/advisories/GHSA-xg2h-wx96-xgxr
severity: medium
status: released
url: https://github.com/influxdata/foo/security/dependabot/1
url: https://github.com/foo/bar/security/dependabot/1
"""
content = tests.testutil.cveContentFromDict(tmpl)
cve_fn = os.path.join(cveDirs["active"], "CVE-1234-5678")
Expand Down Expand Up @@ -2257,7 +2251,7 @@ def test_checkSyntax(self):
advisory: https://github.com/advisories/GHSA-xg2h-wx96-xgxr
severity: medium
status: released
url: https://github.com/influxdata/foo/security/dependabot/1
url: https://github.com/foo/bar/security/dependabot/1
"""
content = tests.testutil.cveContentFromDict(tmpl)
cve_fn = os.path.join(cveDirs["active"], "CVE-1234-5678")
Expand Down