From ee26043a0cc2b03300a4e40a01c7b447a4524418 Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 27 Feb 2025 13:02:52 +0100 Subject: Move flaky remote tests into "scheduled" workflow. --- tests/fips/test_fips_dataset.py | 3 ++- tests/fips/test_fips_iut.py | 6 +++--- tests/fips/test_fips_mip.py | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'tests/fips') diff --git a/tests/fips/test_fips_dataset.py b/tests/fips/test_fips_dataset.py index a375cbd3..34746842 100644 --- a/tests/fips/test_fips_dataset.py +++ b/tests/fips/test_fips_dataset.py @@ -37,12 +37,13 @@ def test_dataset_to_json(toy_dataset: FIPSDataset, data_dir: Path, tmp_path: Pat assert data == template_data -@pytest.mark.slow +@pytest.mark.remote def test_from_web(): dset = FIPSDataset.from_web() assert len(dset) > 4000 +@pytest.mark.remote def test_archive_fits(): fsize = helpers.query_file_size(config.fips_latest_full_archive) tmpdir = helpers.tempdir_for(fsize) diff --git a/tests/fips/test_fips_iut.py b/tests/fips/test_fips_iut.py index 17d15dc8..ede3d13c 100644 --- a/tests/fips/test_fips_iut.py +++ b/tests/fips/test_fips_iut.py @@ -7,7 +7,6 @@ from pathlib import Path import pytest import tests.data.fips.iut -from requests import RequestException from sec_certs.configuration import config from sec_certs.dataset.fips import FIPSDataset @@ -33,7 +32,7 @@ def test_iut_dataset_from_dumps(data_dir: Path): assert len(dset) == 2 -@pytest.mark.xfail(reason="May fail due to network issues.") +@pytest.mark.remote def test_iut_dataset_from_web(): assert IUTDataset.from_web() @@ -43,12 +42,13 @@ def test_iut_snapshot_from_dump(data_dump_path: Path): @pytest.mark.parametrize("preferred_source", ["origin", "sec-certs"]) +@pytest.mark.remote def test_iut_snapshot_from_web(preferred_source): config.preferred_source_remote_datasets = preferred_source assert IUTSnapshot.from_web() -@pytest.mark.xfail(reason="May fail due to server errors.", raises=RequestException) +@pytest.mark.remote def test_from_nist(): assert IUTSnapshot.from_nist_web() diff --git a/tests/fips/test_fips_mip.py b/tests/fips/test_fips_mip.py index b8ac805f..58a11de0 100644 --- a/tests/fips/test_fips_mip.py +++ b/tests/fips/test_fips_mip.py @@ -7,7 +7,6 @@ from pathlib import Path import pytest import tests.data.fips.mip -from requests import RequestException from sec_certs.configuration import config from sec_certs.dataset.fips import FIPSDataset @@ -33,7 +32,7 @@ def test_mip_dataset_from_dumps(data_dir: Path): assert len(dset) == 3 -@pytest.mark.xfail(reason="May fail due to network issues.") +@pytest.mark.remote def test_mip_flows(): dset = MIPDataset.from_web() assert dset.compute_flows() @@ -44,12 +43,13 @@ def test_mip_snapshot_from_dump(data_dump_path: Path): @pytest.mark.parametrize("preferred_source", ["sec-certs", "origin"]) +@pytest.mark.remote def test_from_web(preferred_source): config.preferred_source_remote_datasets = preferred_source assert MIPSnapshot.from_web() -@pytest.mark.xfail(reason="May fail due to server errors.", raises=RequestException) +@pytest.mark.remote def test_from_nist(): assert MIPSnapshot.from_nist_web() -- cgit v1.3.1