Merge "Add test cases for service, secret, ingress, and configmap"

This commit is contained in:
Zuul 2020-06-22 20:55:20 +00:00 committed by Gerrit Code Review
commit 549cc3c2af
7 changed files with 103 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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