X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fkafka-exporter%2Ftests%2Ftest_pod_spec.py;h=ad0e412fdc08f2036c79cfde28498cfbfbe620ec;hb=3cc0316794cc75ecffdf2b969b4ad98d0dd7e826;hp=44d99d8e4e8841a1e2bf889094369bd1ba8a448b;hpb=021b307297a6ab8dfe9ee3af03154989bcd9e0e8;p=osm%2Fdevops.git diff --git a/installers/charm/kafka-exporter/tests/test_pod_spec.py b/installers/charm/kafka-exporter/tests/test_pod_spec.py index 44d99d8e..ad0e412f 100644 --- a/installers/charm/kafka-exporter/tests/test_pod_spec.py +++ b/installers/charm/kafka-exporter/tests/test_pod_spec.py @@ -58,7 +58,10 @@ class TestPodSpec(unittest.TestCase): def test_make_pod_ingress_resources_without_site_url(self) -> NoReturn: """Testing make pod ingress resources without site_url.""" - config = {"site_url": ""} + config = { + "cluster_issuer": "", + "site_url": "", + } app_name = "kafka-exporter" port = 9308 @@ -71,6 +74,7 @@ class TestPodSpec(unittest.TestCase): def test_make_pod_ingress_resources(self) -> NoReturn: """Testing make pod ingress resources.""" config = { + "cluster_issuer": "", "site_url": "http://kafka-exporter", "ingress_whitelist_source_range": "", } @@ -114,6 +118,7 @@ class TestPodSpec(unittest.TestCase): """Testing make pod ingress resources with whitelist_source_range.""" config = { "site_url": "http://kafka-exporter", + "cluster_issuer": "", "ingress_whitelist_source_range": "0.0.0.0/0", } app_name = "kafka-exporter" @@ -160,6 +165,7 @@ class TestPodSpec(unittest.TestCase): config = { "site_url": "https://kafka-exporter", "max_file_size": 0, + "cluster_issuer": "", "ingress_whitelist_source_range": "", "tls_secret_name": "", } @@ -203,6 +209,7 @@ class TestPodSpec(unittest.TestCase): config = { "site_url": "https://kafka-exporter", "max_file_size": 0, + "cluster_issuer": "", "ingress_whitelist_source_range": "", "tls_secret_name": "secret_name", } @@ -289,7 +296,7 @@ class TestPodSpec(unittest.TestCase): } expected_result = [ - "kafka-exporter", + "kafka_exporter", "--kafka.server={}:{}".format( relation.get("kafka_host"), relation.get("kafka_port") ), @@ -304,6 +311,7 @@ class TestPodSpec(unittest.TestCase): image_info = {"upstream-source": "bitnami/kafka-exporter:latest"} config = { "site_url": "", + "cluster_issuer": "", } relation_state = { "kafka_host": "kafka", @@ -327,7 +335,7 @@ class TestPodSpec(unittest.TestCase): } ], "envConfig": {}, - "command": ["kafka-exporter", "--kafka.server=kafka:9090"], + "command": ["kafka_exporter", "--kafka.server=kafka:9090"], "kubernetes": { "readinessProbe": { "httpGet": { @@ -366,6 +374,7 @@ class TestPodSpec(unittest.TestCase): image_info = {"upstream-source": "bitnami/kafka-exporter:latest"} config = { "site_url": "https://kafka-exporter", + "cluster_issuer": "", "tls_secret_name": "kafka-exporter", "max_file_size": 0, "ingress_whitelist_source_range": "0.0.0.0/0", @@ -392,7 +401,7 @@ class TestPodSpec(unittest.TestCase): } ], "envConfig": {}, - "command": ["kafka-exporter", "--kafka.server=kafka:9090"], + "command": ["kafka_exporter", "--kafka.server=kafka:9090"], "kubernetes": { "readinessProbe": { "httpGet": { @@ -466,6 +475,7 @@ class TestPodSpec(unittest.TestCase): image_info = None config = { "site_url": "", + "cluster_issuer": "", } relation_state = { "kafka_host": "kafka", @@ -485,6 +495,7 @@ class TestPodSpec(unittest.TestCase): image_info = {"upstream-source": "bitnami/kafka-exporter:latest"} config = { "site_url": "", + "cluster_issuer": "", } relation_state = {} app_name = "kafka-exporter"