Skipping test on ImportError

This most probably means that the Kubernetes client lib is not
installed.
This commit is contained in:
Jochen Breuer 2017-08-29 17:12:25 +02:00
parent bd76a870ce
commit c227cb25ad
No known key found for this signature in database
GPG key ID: 29ACE79F4D5EEE69

View file

@ -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