From 277f3b9776ecad49a36216b89e223b59bfc76308 Mon Sep 17 00:00:00 2001 From: XDRAGON2002 <81813720+XDRAGON2002@users.noreply.github.com> Date: Wed, 12 Jan 2022 07:33:23 +0530 Subject: [PATCH] test: Move backported fix tests to LONG_TESTS (fixes #1502) (#1512) --- test/test_available_fix.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_available_fix.py b/test/test_available_fix.py index 14dba0c909..c0eb443db7 100644 --- a/test/test_available_fix.py +++ b/test/test_available_fix.py @@ -1,6 +1,8 @@ # Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: GPL-3.0-or-later +from test.utils import LONG_TESTS + import pytest from cve_bin_tool.available_fix import AvailableFixReport @@ -87,6 +89,9 @@ def arrange_data(self): ) } + @pytest.mark.skipif( + LONG_TESTS() != 1, reason="Skipping tests to reduce network calls" + ) def test_debian_backport_fix_output(self, caplog: pytest.LogCaptureFixture): """Test Backported fix for Debian distros output on console""" @@ -99,6 +104,9 @@ def test_debian_backport_fix_output(self, caplog: pytest.LogCaptureFixture): assert expected_output == [rec.message for rec in caplog.records] + @pytest.mark.skipif( + LONG_TESTS() != 1, reason="Skipping tests to reduce network calls" + ) def test_debian_available_fix_output(self, caplog: pytest.LogCaptureFixture): """Test Available fix for Debian distros output on console""" @@ -113,6 +121,9 @@ def test_debian_available_fix_output(self, caplog: pytest.LogCaptureFixture): assert expected_output == [rec.message for rec in caplog.records] + @pytest.mark.skipif( + LONG_TESTS() != 1, reason="Skipping tests to reduce network calls" + ) def test_redhat_available_fix_output(self, caplog: pytest.LogCaptureFixture): """Test Available fix for Redhat distros output on console"""