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

DISCOVERY-621: Mark slow tests #526

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions camayoc/tests/qpc/api/v1/reports/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
has_raw_facts = partial(expected_data_has_attribute, attr_name="raw_facts")


@pytest.mark.slow
@pytest.mark.runs_scan
@pytest.mark.parametrize("scan_name", scan_names(has_product))
def test_products_found_deployment_report(scans, scan_name):
Expand Down Expand Up @@ -96,6 +97,7 @@ def test_products_found_deployment_report(scans, scan_name):
)


@pytest.mark.slow
@pytest.mark.runs_scan
@pytest.mark.parametrize("scan_name", scan_names(has_distribution))
def test_OS_found_deployment_report(scans, scan_name):
Expand Down
1 change: 1 addition & 0 deletions camayoc/tests/qpc/api/v1/scanjobs/test_run_scanjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from camayoc.types.scans import ScanSimplifiedStatusEnum


@pytest.mark.slow
@pytest.mark.runs_scan
@pytest.mark.parametrize("scan_name", all_scan_names())
def test_scan_complete(scans, scan_name):
Expand Down
1 change: 1 addition & 0 deletions camayoc/tests/qpc/cli/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ def source_option_attr(source_option, finished_scan):
return getattr(finished_scan, attr_name)


@pytest.mark.slow
@pytest.mark.runs_scan
@pytest.mark.parametrize("source_option", REPORT_SOURCE_OPTIONS)
@pytest.mark.parametrize("output_format", REPORT_OUTPUT_FORMATS)
Expand Down
3 changes: 3 additions & 0 deletions camayoc/tests/qpc/cli/test_scanjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def contains_single_source(sources_in_scan):


@pytest.mark.nightly_only
@pytest.mark.slow
@pytest.mark.runs_scan
def test_scanjob_with_multiple_sources(qpc_server_config, data_provider):
"""Scan multiple source types.
Expand Down Expand Up @@ -103,6 +104,7 @@ def test_scanjob_with_multiple_sources(qpc_server_config, data_provider):


@pytest.mark.nightly_only
@pytest.mark.slow
@pytest.mark.runs_scan
def test_scanjob_with_disabled_products(isolated_filesystem, qpc_server_config, data_provider):
"""Perform a scan with optional products disabled.
Expand Down Expand Up @@ -162,6 +164,7 @@ def test_scanjob_with_disabled_products(isolated_filesystem, qpc_server_config,


@pytest.mark.nightly_only
@pytest.mark.slow
@pytest.mark.runs_scan
def test_scanjob_with_enabled_extended_products(qpc_server_config, data_provider):
"""Perform a scan with extended products enabled.
Expand Down
1 change: 1 addition & 0 deletions camayoc/tests/qpc/ui/test_endtoend.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def source_names():
yield pytest.param(source_definition.name, id=fixture_id)


@pytest.mark.slow
@pytest.mark.nightly_only
@pytest.mark.parametrize("source_name", source_names())
def test_end_to_end(tmp_path, cleaning_data_provider, ui_client: Client, source_name):
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ filterwarnings = "ignore::urllib3.exceptions.InsecureRequestWarning"
markers = [
"ssh_keyfile_path: mark test with SSH key file path mapped to /sshkeys/ on the server (deselect with '-m \"not ssh_keyfile_path\"')",
"runs_scan: tests that run scans (might be slow!)",
"slow: tests that take a long time to run (on average, more than 30 seconds)",
"nightly_only: tests to execute only during nightly (or full) run, i.e. not during PR check; note that actual selection is implemented in discovery-ci",
"pr_only: tests to execute only during PR check run, i.e. not during nightly run; note that actual selection is implemented in discovery-ci",
]
Expand Down
Loading