Add a unit test to confirm if the manifest does not specify a namespace

Change-Id: I75f341aac9ef989e79704249ed2a2c545616bc4d
This commit is contained in:
okozachenko
2020-05-12 01:28:39 +03:00
parent 1a4342dc0d
commit fe221df55f

View File

@@ -46,6 +46,10 @@ class KubernetesObjectTestCase(testtools.TestCase):
cls.object = utils.render_template(cls.TEMPLATE_FILE,
name=name, spec=spec)
def test_metadata_has_no_namespace(self):
"""Ensure that the metadata does not specify the namespace."""
self.assertNotIn("namespace", self.object["metadata"])
class KubernetesAppTestCaseMixin:
"""Mix-in to be used for tests that involve apps and containers."""