X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_k8s_helm_conn.py;h=ae9338d6e28802340ffeae4869668e39d493cd5b;hb=refs%2Fchanges%2F70%2F11870%2F4;hp=a6515f1f879cf50701270bd7e6575fd2bdd54997;hpb=b41de17df6282334088ffbd887fbc01e496e1797;p=osm%2FN2VC.git diff --git a/n2vc/tests/unit/test_k8s_helm_conn.py b/n2vc/tests/unit/test_k8s_helm_conn.py index a6515f1..ae9338d 100644 --- a/n2vc/tests/unit/test_k8s_helm_conn.py +++ b/n2vc/tests/unit/test_k8s_helm_conn.py @@ -42,7 +42,7 @@ class TestK8sHelmConn(asynctest.TestCase): # pass fake kubectl and helm commands to make sure it does not call actual commands K8sHelmConnector._check_file_exists = asynctest.Mock(return_value=True) K8sHelmConnector._local_async_exec = asynctest.CoroutineMock( - return_value=("", 0) + return_value=(0, "") ) cluster_dir = self.fs.path + self.cluster_id self.kube_config = self.fs.path + self.cluster_id + "/.kube/config" @@ -87,24 +87,24 @@ class TestK8sHelmConn(asynctest.TestCase): call0_kargs = calls[0][1] self.assertEqual( call0_kargs.get("command"), - repo_update_command, - "Invalid repo update command: {}".format(call0_kargs.get("command")), + repo_add_command, + "Invalid repo add command: {}".format(call0_kargs.get("command")), ) self.assertEqual( call0_kargs.get("env"), self.env, - "Invalid env for update command: {}".format(call0_kargs.get("env")), + "Invalid env for add command: {}".format(call0_kargs.get("env")), ) call1_kargs = calls[1][1] self.assertEqual( call1_kargs.get("command"), - repo_add_command, - "Invalid repo add command: {}".format(call1_kargs.get("command")), + repo_update_command, + "Invalid repo update command: {}".format(call1_kargs.get("command")), ) self.assertEqual( call1_kargs.get("env"), self.env, - "Invalid env for add command: {}".format(call1_kargs.get("env")), + "Invalid env for update command: {}".format(call1_kargs.get("env")), ) @asynctest.fail_on(active_handles=True) @@ -508,7 +508,7 @@ class TestK8sHelmConn(asynctest.TestCase): self.helm_conn._local_async_exec = asynctest.CoroutineMock(return_value=("", 0)) await self.helm_conn._status_kdu( - self.cluster_id, kdu_instance, self.namespace, return_text=True + self.cluster_id, kdu_instance, self.namespace, yaml_format=True ) command = ( "env KUBECONFIG=./tmp/helm_cluster_id/.kube/config /usr/bin/helm status {} --output yaml" @@ -551,7 +551,7 @@ class TestK8sHelmConn(asynctest.TestCase): cluster_id=self.cluster_id, kdu_instance=kdu_instance, namespace=self.namespace, - return_text=False, + yaml_format=False, ) self.helm_conn.write_app_status_to_db.assert_called_once_with( db_dict=db_dict,