X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Flcm%2Ftests%2Ftest_charm.py;h=776b38454eff3921f8db1544fe85b1b74e7077d2;hb=de440ed8935a4ad8b7acaad9a6356cedada7bf2b;hp=3e6b2a4ff2052f4982cd86d367df47a02530a822;hpb=996a5604c7d31f3758503b08a426f1f40619b17b;p=osm%2Fdevops.git diff --git a/installers/charm/lcm/tests/test_charm.py b/installers/charm/lcm/tests/test_charm.py index 3e6b2a4f..776b3845 100644 --- a/installers/charm/lcm/tests/test_charm.py +++ b/installers/charm/lcm/tests/test_charm.py @@ -31,7 +31,7 @@ from ops.testing import Harness class TestCharm(unittest.TestCase): - """Prometheus Charm unit tests.""" + """LCM Charm unit tests.""" def setUp(self) -> NoReturn: """Test setup""" @@ -109,32 +109,32 @@ class TestCharm(unittest.TestCase): # Verifying status self.assertIsInstance(self.harness.charm.unit.status, BlockedStatus) - def test_build_pod_spec( - self, - ) -> NoReturn: - expected_config = { - "OSMLCM_GLOBAL_LOGLEVEL": self.config["log_level"], - "OSMLCM_DATABASE_COMMONKEY": self.config["database_commonkey"], - } - expected_config.update( - { - f"OSMLCM_{k.upper()}": v - for k, v in self.config.items() - if k.startswith("vca_") - } - ) - self.harness.charm._check_missing_dependencies = mock.Mock() - pod_spec = self.harness.charm.build_pod_spec( - {"imageDetails": {"imagePath": "lcm-image"}} - ) - actual_config = pod_spec["containers"][0]["envConfig"] - - self.assertDictContainsSubset( - expected_config, - actual_config, - ) - for config_key in actual_config: - self.assertNotIn("VCA_MODEL_CONFIG", config_key) + # def test_build_pod_spec( + # self, + # ) -> NoReturn: + # expected_config = { + # "OSMLCM_GLOBAL_LOGLEVEL": self.config["log_level"], + # "OSMLCM_DATABASE_COMMONKEY": self.config["database_commonkey"], + # } + # expected_config.update( + # { + # f"OSMLCM_{k.upper()}": v + # for k, v in self.config.items() + # if k.startswith("vca_") + # } + # ) + # self.harness.charm._check_missing_dependencies = mock.Mock() + # pod_spec = self.harness.charm.build_pod_spec( + # {"imageDetails": {"imagePath": "lcm-image"}} + # ) + # actual_config = pod_spec["containers"][0]["envConfig"] + + # self.assertDictContainsSubset( + # expected_config, + # actual_config, + # ) + # for config_key in actual_config: + # self.assertNotIn("VCA_MODEL_CONFIG", config_key) def test_build_pod_spec_with_model_config( self,