mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skipping test on ImportError
This most probably means that the Kubernetes client lib is not installed.
This commit is contained in:
parent
bd76a870ce
commit
c227cb25ad
1 changed files with 6 additions and 1 deletions
|
@ -16,10 +16,15 @@ from tests.support.mock import (
|
|||
NO_MOCK_REASON
|
||||
)
|
||||
|
||||
from salt.modules import kubernetes
|
||||
try:
|
||||
from salt.modules import kubernetes
|
||||
except ImportError:
|
||||
kubernetes = False
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
@skipIf(kubernetes is False, "Probably 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