Feature 10947: Create certificates for helm EE:
[osm/LCM.git] / osm_lcm / tests / test_lcm_helm_conn.py
index 89ca891..724b5e2 100644 (file)
@@ -63,6 +63,7 @@ class TestLcmHelmConn(asynctest.TestCase):
         namespace = "testnamespace"
         db_dict = {}
         artifact_path = "helm_sample_charm"
+        chart_model = "helm_sample_charm"
         helm_chart_id = "helm_sample_charm_0001"
         self.helm_conn._k8sclusterhelm3.install = asynctest.CoroutineMock(
             return_value=None
@@ -78,7 +79,11 @@ class TestLcmHelmConn(asynctest.TestCase):
 
         self.db.get_one.return_value = {"_admin": {"helm-chart-v3": {"id": "myk8s_id"}}}
         ee_id, _ = await self.helm_conn.create_execution_environment(
-            namespace, db_dict, artifact_path=artifact_path, vca_type="helm-v3"
+            namespace,
+            db_dict,
+            artifact_path=artifact_path,
+            chart_model=chart_model,
+            vca_type="helm-v3",
         )
         self.assertEqual(
             ee_id,
@@ -99,7 +104,6 @@ class TestLcmHelmConn(asynctest.TestCase):
     async def test_get_ee_ssh_public__key(self):
         ee_id = "osm.helm_sample_charm_0001"
         db_dict = {}
-        lcm_helm_conn.socket.gethostbyname = asynctest.Mock()
         mock_pub_key = "ssh-rsapubkey"
         self.db.get_one.return_value = {"_admin": {"helm-chart": {"id": "myk8s_id"}}}
         self.helm_conn._get_ssh_key = asynctest.CoroutineMock(return_value=mock_pub_key)
@@ -110,7 +114,6 @@ class TestLcmHelmConn(asynctest.TestCase):
 
     @asynctest.fail_on(active_handles=True)
     async def test_execute_primitive(self):
-        lcm_helm_conn.socket.gethostbyname = asynctest.Mock()
         ee_id = "osm.helm_sample_charm_0001"
         primitive_name = "sleep"
         params = {}
@@ -124,7 +127,6 @@ class TestLcmHelmConn(asynctest.TestCase):
     @asynctest.fail_on(active_handles=True)
     async def test_execute_config_primitive(self):
         self.logger.debug("Execute config primitive")
-        lcm_helm_conn.socket.gethostbyname = asynctest.Mock()
         ee_id = "osm.helm_sample_charm_0001"
         primitive_name = "config"
         params = {"ssh-host-name": "host1"}