X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_k8s_helm3_conn.py;fp=n2vc%2Ftests%2Funit%2Ftest_k8s_helm3_conn.py;h=3b8132395148d3cb9ae3d273cf3ffd791d87caf3;hp=df3e1c36bb1c7bcecf0bc96befdd95b87b289518;hb=c4da25cc55411e6cea1e83d29c206bce421f0728;hpb=5ab1064304b993ea6364b5d932c5c0cb7434cfb7 diff --git a/n2vc/tests/unit/test_k8s_helm3_conn.py b/n2vc/tests/unit/test_k8s_helm3_conn.py index df3e1c3..3b81323 100644 --- a/n2vc/tests/unit/test_k8s_helm3_conn.py +++ b/n2vc/tests/unit/test_k8s_helm3_conn.py @@ -134,25 +134,24 @@ class TestK8sHelm3Conn(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.kdu_instance = "stable-openldap-0005399828" + self.helm_conn.generate_kdu_instance_name = Mock(return_value=self.kdu_instance) self.helm_conn._get_namespaces = asynctest.CoroutineMock(return_value=[]) self.helm_conn._create_namespace = asynctest.CoroutineMock() - 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, + self.kdu_instance, + atomic=True, + namespace=self.namespace, + db_dict=db_dict + ) self.helm_conn._get_namespaces.assert_called_once() self.helm_conn._create_namespace.assert_called_once_with(self.cluster_id, self.namespace) 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,