diff --git a/openstack_operator/tests/unit/base.py b/openstack_operator/tests/unit/base.py index 3fc86248..eee523f9 100644 --- a/openstack_operator/tests/unit/base.py +++ b/openstack_operator/tests/unit/base.py @@ -133,3 +133,19 @@ class StatefulSetTestCase(KubernetesObjectTestCase, class DaemonSetTestCase(KubernetesObjectTestCase): """Basic tests for Kubernetes DaemonSets.""" + + +class ConfigMapTestCase(KubernetesObjectTestCase): + """Basic tests for Kubernetes ConfigMaps.""" + + +class IngressTestCase(KubernetesObjectTestCase): + """Basic tests for Kubernetes Ingresses.""" + + +class SecretTestCase(KubernetesObjectTestCase): + """Basic tests for Kubernetes Secrets.""" + + +class ServiceTestCase(KubernetesObjectTestCase): + """Basic tests for Kubernetes Services.""" diff --git a/openstack_operator/tests/unit/test_chronyd.py b/openstack_operator/tests/unit/test_chronyd.py index de0e0dd1..de18686e 100644 --- a/openstack_operator/tests/unit/test_chronyd.py +++ b/openstack_operator/tests/unit/test_chronyd.py @@ -25,3 +25,10 @@ class ChronydAPIDeploymentTestCase(base.DaemonSetTestCase): RELEASE_TYPE = 'chronyd' TEMPLATE_FILE = 'chronyd/daemonset.yml.j2' + + +class ChronydAPIConfigMapTestCase(base.ConfigMapTestCase): + """Basic tests for the ConfigMap.""" + + RELEASE_TYPE = 'chronyd' + TEMPLATE_FILE = 'chronyd/configmap.yml.j2' diff --git a/openstack_operator/tests/unit/test_heat.py b/openstack_operator/tests/unit/test_heat.py index 3e454fba..173e3577 100644 --- a/openstack_operator/tests/unit/test_heat.py +++ b/openstack_operator/tests/unit/test_heat.py @@ -25,3 +25,10 @@ class HeatAPIDeploymentTestCase(base.DeploymentTestCase): RELEASE_TYPE = 'heat' TEMPLATE_FILE = 'heat/deployment.yml.j2' + + +class HeatAPServiceTestCase(base.ServiceTestCase): + """Basic tests for the Service.""" + + RELEASE_TYPE = 'heat' + TEMPLATE_FILE = 'heat/service.yml.j2' diff --git a/openstack_operator/tests/unit/test_horizon.py b/openstack_operator/tests/unit/test_horizon.py index ba853f19..21fd03c4 100644 --- a/openstack_operator/tests/unit/test_horizon.py +++ b/openstack_operator/tests/unit/test_horizon.py @@ -20,8 +20,36 @@ This module contains all the tests for the Horizon operator. from openstack_operator.tests.unit import base +class HorizonConfigMapTestCase(base.ConfigMapTestCase): + """Basic tests for the ConfigMap.""" + + RELEASE_TYPE = 'horizon' + TEMPLATE_FILE = 'horizon/configmap.yml.j2' + + class HorizonDeploymentTestCase(base.DeploymentTestCase): """Basic tests for the Deployment.""" RELEASE_TYPE = 'horizon' TEMPLATE_FILE = 'horizon/deployment.yml.j2' + + +class HorizonIngressTestCase(base.IngressTestCase): + """Basic tests for the Ingress.""" + + RELEASE_TYPE = 'horizon' + TEMPLATE_FILE = 'horizon/ingress.yml.j2' + + +class HorizonSecretTestCase(base.SecretTestCase): + """Basic tests for the Secret.""" + + RELEASE_TYPE = 'horizon' + TEMPLATE_FILE = 'horizon/secret-secretkey.yml.j2' + + +class HorizonServiceTestCase(base.ServiceTestCase): + """Basic tests for the Service.""" + + RELEASE_TYPE = 'horizon' + TEMPLATE_FILE = 'horizon/service.yml.j2' diff --git a/openstack_operator/tests/unit/test_keystone.py b/openstack_operator/tests/unit/test_keystone.py index c501fca1..3bf1ae00 100644 --- a/openstack_operator/tests/unit/test_keystone.py +++ b/openstack_operator/tests/unit/test_keystone.py @@ -25,3 +25,24 @@ class KeystoneDeploymentTestCase(base.DeploymentTestCase): RELEASE_TYPE = 'keystone' TEMPLATE_FILE = 'keystone/deployment.yml.j2' + + +class KeystoneIngressTestCase(base.IngressTestCase): + """Basic tests for the Ingress.""" + + RELEASE_TYPE = 'keystone' + TEMPLATE_FILE = 'keystone/ingress.yml.j2' + + +class KeystoneSecretTestCase(base.SecretTestCase): + """Basic tests for the Secret.""" + + RELEASE_TYPE = 'keystone' + TEMPLATE_FILE = 'keystone/secret-fernet.yml.j2' + + +class KeystoneServiceTestCase(base.ServiceTestCase): + """Basic tests for the Service.""" + + RELEASE_TYPE = 'keystone' + TEMPLATE_FILE = 'keystone/service.yml.j2' diff --git a/openstack_operator/tests/unit/test_mcrouter.py b/openstack_operator/tests/unit/test_mcrouter.py index 97e213e2..33e7a87f 100644 --- a/openstack_operator/tests/unit/test_mcrouter.py +++ b/openstack_operator/tests/unit/test_mcrouter.py @@ -20,9 +20,25 @@ This module contains all the tests for the Mcrouter operator. from openstack_operator.tests.unit import base +class McrouterConfigMapTestCase(base.ConfigMapTestCase): + """Basic tests for the ConfigMap.""" + + SAMPLE_FILE = 'infrastructure_v1alpha1_mcrouter.yaml' + TEMPLATE_FILE = 'mcrouter/configmap.yml.j2' + AUTO_GENERATED = False + + class McrouterDeploymentTestCase(base.StatefulSetTestCase): """Basic tests for the Deployment.""" SAMPLE_FILE = 'infrastructure_v1alpha1_mcrouter.yaml' TEMPLATE_FILE = 'mcrouter/deployment.yml.j2' AUTO_GENERATED = False + + +class McrouterServiceTestCase(base.ServiceTestCase): + """Basic tests for the Service.""" + + SAMPLE_FILE = 'infrastructure_v1alpha1_mcrouter.yaml' + TEMPLATE_FILE = 'mcrouter/service.yml.j2' + AUTO_GENERATED = False diff --git a/openstack_operator/tests/unit/test_memcached.py b/openstack_operator/tests/unit/test_memcached.py index a0ad3550..85cddcdc 100644 --- a/openstack_operator/tests/unit/test_memcached.py +++ b/openstack_operator/tests/unit/test_memcached.py @@ -38,6 +38,14 @@ class MemcachedOperatorTestCase(base.BaseTestCase): 'memcached/deployment.yml.j2', name="foo", spec={}) +class MemcachedServiceTestCase(base.ServiceTestCase): + """Basic tests for the Service.""" + + SAMPLE_FILE = 'infrastructure_v1alpha1_memcached.yaml' + TEMPLATE_FILE = 'memcached/service.yml.j2' + AUTO_GENERATED = False + + class MemcachedStatefulSetTestCase(base.StatefulSetTestCase): """Basic tests for the StatefulSet."""