2021-01-08 13:41:50 +01:00
|
|
|
From ccdef0b979c575d93e82088049ef81262320ed74 Mon Sep 17 00:00:00 2001
|
2020-04-07 14:14:01 +02:00
|
|
|
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
|
|
|
<psuarezhernandez@suse.com>
|
|
|
|
Date: Wed, 11 Mar 2020 16:14:16 +0000
|
|
|
|
Subject: [PATCH] Remove deprecated usage of NO_MOCK and NO_MOCK_REASON
|
|
|
|
|
|
|
|
---
|
|
|
|
tests/integration/pillar/test_git_pillar.py | 1 -
|
|
|
|
tests/unit/cli/test_batch_async.py | 3 +--
|
|
|
|
tests/unit/modules/test_cmdmod.py | 1 -
|
2021-01-08 13:41:50 +01:00
|
|
|
tests/unit/modules/test_kubeadm.py | 3 +--
|
|
|
|
tests/unit/modules/test_xfs.py | 2 +-
|
|
|
|
tests/unit/states/test_btrfs.py | 1 -
|
|
|
|
tests/unit/utils/test_pkg.py | 1 -
|
|
|
|
7 files changed, 3 insertions(+), 9 deletions(-)
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 979dfebb94..987c5c5de3 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/integration/pillar/test_git_pillar.py
|
|
|
|
+++ b/tests/integration/pillar/test_git_pillar.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -1601,7 +1601,6 @@ class TestPygit2SSH(GitPillarSSHTestBase):
|
2020-04-07 14:14:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
2021-01-08 13:41:50 +01:00
|
|
|
@skipIf(_windows_or_mac(), "minion is windows or mac")
|
2020-04-07 14:14:01 +02:00
|
|
|
@skip_if_not_root
|
2021-01-08 13:41:50 +01:00
|
|
|
@skipIf(
|
2020-04-07 14:14:01 +02:00
|
|
|
diff --git a/tests/unit/cli/test_batch_async.py b/tests/unit/cli/test_batch_async.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 82a712b15b..c0b708de76 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/cli/test_batch_async.py
|
|
|
|
+++ b/tests/unit/cli/test_batch_async.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -1,11 +1,10 @@
|
2020-04-07 14:14:01 +02:00
|
|
|
import salt.ext.tornado
|
2021-01-08 13:41:50 +01:00
|
|
|
from salt.cli.batch_async import BatchAsync
|
2020-04-07 14:14:01 +02:00
|
|
|
from salt.ext.tornado.testing import AsyncTestCase
|
2021-01-08 13:41:50 +01:00
|
|
|
-from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
2020-04-07 14:14:01 +02:00
|
|
|
+from tests.support.mock import MagicMock, patch
|
2021-01-08 13:41:50 +01:00
|
|
|
from tests.support.unit import TestCase, skipIf
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
|
|
class AsyncBatchTestCase(AsyncTestCase, TestCase):
|
|
|
|
def setUp(self):
|
2021-01-08 13:41:50 +01:00
|
|
|
self.io_loop = self.get_new_ioloop()
|
2020-04-07 14:14:01 +02:00
|
|
|
diff --git a/tests/unit/modules/test_cmdmod.py b/tests/unit/modules/test_cmdmod.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index f3348bc379..15b97f8568 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/modules/test_cmdmod.py
|
|
|
|
+++ b/tests/unit/modules/test_cmdmod.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -24,7 +24,6 @@ DEFAULT_SHELL = "foo/bar"
|
|
|
|
MOCK_SHELL_FILE = "# List of acceptable shells\n" "\n" "/bin/bash\n"
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
|
|
class CMDMODTestCase(TestCase, LoaderModuleMockMixin):
|
2021-01-08 13:41:50 +01:00
|
|
|
"""
|
2020-04-07 14:14:01 +02:00
|
|
|
Unit tests for the salt.modules.cmdmod module
|
|
|
|
diff --git a/tests/unit/modules/test_kubeadm.py b/tests/unit/modules/test_kubeadm.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 91e4a9e68e..4940dbebb4 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/modules/test_kubeadm.py
|
|
|
|
+++ b/tests/unit/modules/test_kubeadm.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -24,11 +24,10 @@ import pytest
|
2020-04-07 14:14:01 +02:00
|
|
|
import salt.modules.kubeadm as kubeadm
|
|
|
|
from salt.exceptions import CommandExecutionError
|
|
|
|
from tests.support.mixins import LoaderModuleMockMixin
|
2021-01-08 13:41:50 +01:00
|
|
|
-from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
|
|
|
+from tests.support.mock import MagicMock, patch
|
2020-04-07 14:14:01 +02:00
|
|
|
from tests.support.unit import TestCase, skipIf
|
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
2021-01-08 13:41:50 +01:00
|
|
|
class KubeAdmTestCase(TestCase, LoaderModuleMockMixin):
|
|
|
|
"""
|
|
|
|
Test cases for salt.modules.kubeadm
|
2020-04-07 14:14:01 +02:00
|
|
|
diff --git a/tests/unit/modules/test_xfs.py b/tests/unit/modules/test_xfs.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 778aff793d..28783260d0 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/modules/test_xfs.py
|
|
|
|
+++ b/tests/unit/modules/test_xfs.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -3,7 +3,7 @@ import textwrap
|
2020-04-07 14:14:01 +02:00
|
|
|
import salt.modules.xfs as xfs
|
2021-01-08 13:41:50 +01:00
|
|
|
from tests.support.mixins import LoaderModuleMockMixin
|
|
|
|
from tests.support.mock import MagicMock, patch
|
|
|
|
-from tests.support.unit import TestCase
|
|
|
|
+from tests.support.unit import TestCase, skipIf
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
@patch("salt.modules.xfs._get_mounts", MagicMock(return_value={}))
|
2020-04-07 14:14:01 +02:00
|
|
|
diff --git a/tests/unit/states/test_btrfs.py b/tests/unit/states/test_btrfs.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 74e44641b8..b8f70bccfe 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/states/test_btrfs.py
|
|
|
|
+++ b/tests/unit/states/test_btrfs.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -32,7 +32,6 @@ from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
|
|
|
from tests.support.unit import TestCase, skipIf
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
|
|
class BtrfsTestCase(TestCase, LoaderModuleMockMixin):
|
2021-01-08 13:41:50 +01:00
|
|
|
"""
|
2020-04-07 14:14:01 +02:00
|
|
|
Test cases for salt.states.btrfs
|
|
|
|
diff --git a/tests/unit/utils/test_pkg.py b/tests/unit/utils/test_pkg.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 404b01b12b..794b851df2 100644
|
2020-04-07 14:14:01 +02:00
|
|
|
--- a/tests/unit/utils/test_pkg.py
|
|
|
|
+++ b/tests/unit/utils/test_pkg.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -9,7 +9,6 @@ except ImportError:
|
2020-04-07 14:14:01 +02:00
|
|
|
pytest = None
|
|
|
|
|
|
|
|
|
|
|
|
-@skipIf(NO_MOCK, NO_MOCK_REASON)
|
2021-01-08 13:41:50 +01:00
|
|
|
@skipIf(pytest is None, "PyTest is missing")
|
2020-04-07 14:14:01 +02:00
|
|
|
class PkgRPMTestCase(TestCase):
|
2021-01-08 13:41:50 +01:00
|
|
|
"""
|
2020-04-07 14:14:01 +02:00
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2020-04-07 14:14:01 +02:00
|
|
|
|
|
|
|
|