Fix bug 1448: minor fix in JujuModelWatcher.wait_for_model
[osm/N2VC.git] / n2vc / tests / unit / test_k8s_helm_conn.py
index 51edbd6..1eb5775 100644 (file)
@@ -118,21 +118,19 @@ class TestK8sHelmConn(asynctest.TestCase):
         self.helm_conn._local_async_exec = asynctest.CoroutineMock(return_value=("", 0))
         self.helm_conn._status_kdu = asynctest.CoroutineMock(return_value=None)
         self.helm_conn._store_status = asynctest.CoroutineMock()
-        self.helm_conn._generate_release_name = Mock(return_value="stable-openldap-0005399828")
+        self.helm_conn.generate_kdu_instance_name = Mock(return_value=kdu_instance)
 
-        kdu_instance = await self.helm_conn.install(self.cluster_uuid,
-                                                    kdu_model,
-                                                    atomic=True,
-                                                    namespace=self.namespace,
-                                                    db_dict=db_dict)
+        await self.helm_conn.install(
+            self.cluster_uuid,
+            kdu_model,
+            kdu_instance,
+            atomic=True,
+            namespace=self.namespace,
+            db_dict=db_dict
+        )
 
         self.helm_conn.fs.sync.assert_called_once_with(from_path=self.cluster_id)
         self.helm_conn.fs.reverse_sync.assert_called_once_with(from_path=self.cluster_id)
-        self.helm_conn._generate_release_name.assert_called_once_with("stable/openldap")
-        self.helm_conn._status_kdu.assert_called_once_with(cluster_id=self.cluster_id,
-                                                           kdu_instance=kdu_instance,
-                                                           namespace=self.namespace,
-                                                           show_error_log=False)
         self.helm_conn._store_status.assert_called_with(cluster_id=self.cluster_id,
                                                         kdu_instance=kdu_instance,
                                                         namespace=self.namespace,