Enforce tests on ImagePullPolicy being always
Change-Id: I1b1c7dd5ca14588d1175a25e35c958ad0b2bfc64
This commit is contained in:
parent
f4103a89be
commit
555fabc0bf
@ -48,6 +48,11 @@ class KubernetesObjectTestCase(testtools.TestCase):
|
||||
class KubernetesAppTestCaseMixin:
|
||||
"""Mix-in to be used for tests that involve apps and containers."""
|
||||
|
||||
def test_containers_use_always_image_pull_policy(self):
|
||||
"""Ensure that all containers use 'Always' as imagePullPolicy."""
|
||||
for container in self.object['spec']['template']['spec']['containers']:
|
||||
self.assertEqual("Always", container.get('imagePullPolicy'))
|
||||
|
||||
def test_containers_have_liveness_probe(self):
|
||||
"""Ensure that all containers have liveness probes."""
|
||||
for container in self.object['spec']['template']['spec']['containers']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user