Skip to content

Commit

Permalink
test: re-enable failing tests from intel#3653 (intel#3720)
Browse files Browse the repository at this point in the history
* test: try re-enabling exploit test

* test: re-add test_csv2cve tests

* test: re-enable language scanner tests

* test: re-enable test_sbom tests
  • Loading branch information
terriko authored and inosmeet committed Feb 16, 2024
1 parent 263cde2 commit 5ca1bab
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/cvedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class CVEDB:
BACKUPCACHEDIR = DISK_LOCATION_BACKUP
LOGGER = LOGGER.getChild("CVEDB")
SOURCES = [
nvd_source.NVD_Source,
curl_source.Curl_Source,
osv_source.OSV_Source,
gad_source.GAD_Source,
nvd_source.NVD_Source, # last to avoid data overwrites
]

INSERT_QUERIES = {
Expand Down
1 change: 0 additions & 1 deletion test/test_csv2cve.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class TestCSV2CVE:
@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.asyncio
async def test_csv2cve_valid_file(self, caplog):
file_path = join(dirname(__file__), "csv", "triage.csv")
Expand Down
1 change: 0 additions & 1 deletion test/test_exploits.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class TestExploitScanner:
@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize(
"check_exploits, exploits_list, product_info, triage_info, expected_result",
(
Expand Down
2 changes: 0 additions & 2 deletions test/test_language_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def setup_class(cls):
cls.cvedb.get_cvelist_if_stale()
print("Database setup complete.")

@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize(
"filename, product_list",
(((str(TEST_FILE_PATH / "pom.xml")), ["jmeter", "hamcrest"]),),
Expand Down Expand Up @@ -235,7 +234,6 @@ def test_language_package(self, filename: str, products: set[str]) -> None:
assert p in found_product
assert file_path == filename

@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize("filename", ((str(TEST_FILE_PATH / "PKG-INFO")),))
def test_python_package(self, filename: str) -> None:
scanner = VersionScanner()
Expand Down
3 changes: 0 additions & 3 deletions test/test_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def test_invalid_type(self, filename: str, sbom_type: str):
sbom_engine = SBOMManager(filename, sbom_type)
assert sbom_engine.scan_file() == {}

@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize(
"filename, spdx_parsed_data",
(
Expand All @@ -89,7 +88,6 @@ def test_valid_spdx_file(
for p in spdx_parsed_data:
assert p in scan_result

@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize(
"filename, cyclonedx_parsed_data",
(
Expand All @@ -107,7 +105,6 @@ def test_valid_cyclonedx_file(
for p in cyclonedx_parsed_data:
assert p in scan_result

@pytest.mark.skip(reason="Temporarily disabled -- may need data changes")
@pytest.mark.parametrize(
"filename, swid_parsed_data",
((str(SBOM_PATH / "swid_test.xml"), PARSED_SBOM_DATA),),
Expand Down

0 comments on commit 5ca1bab

Please sign in to comment.