mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #46103 from bdrung/2017.7
Fix skipping Kubernetes tests if client is not installed
This commit is contained in:
commit
0eb137fb4e
1 changed files with 3 additions and 6 deletions
|
@ -16,15 +16,12 @@ from tests.support.mock import (
|
|||
NO_MOCK_REASON
|
||||
)
|
||||
|
||||
try:
|
||||
from salt.modules import kubernetes
|
||||
except ImportError:
|
||||
kubernetes = False
|
||||
from salt.modules import kubernetes
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
@skipIf(kubernetes is False, "Probably Kubernetes client lib is not installed. \
|
||||
Skipping test_kubernetes.py")
|
||||
@skipIf(not kubernetes.HAS_LIBS, "Kubernetes client lib is not installed. "
|
||||
"Skipping test_kubernetes.py")
|
||||
class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
'''
|
||||
Test cases for salt.modules.kubernetes
|
||||
|
|
Loading…
Add table
Reference in a new issue