X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_k8s_helm_conn.py;h=5112363fb79fad9ade0028c6a6fa04d68e34378a;hp=907ff404e357291c21ba5289f42dcdfacf45b37d;hb=3c443f5899f2cc953b27ed4ac4c5d1a247248c5e;hpb=9e297a4a8ddae703467a57d87538d01b76b12d17 diff --git a/n2vc/tests/unit/test_k8s_helm_conn.py b/n2vc/tests/unit/test_k8s_helm_conn.py index 907ff40..5112363 100644 --- a/n2vc/tests/unit/test_k8s_helm_conn.py +++ b/n2vc/tests/unit/test_k8s_helm_conn.py @@ -160,9 +160,17 @@ class TestK8sHelmConn(asynctest.TestCase): 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.fs.sync.assert_has_calls( + [ + asynctest.call(from_path=self.cluster_id), + asynctest.call(from_path=self.cluster_id), + ] + ) + self.helm_conn.fs.reverse_sync.assert_has_calls( + [ + asynctest.call(from_path=self.cluster_id), + asynctest.call(from_path=self.cluster_id), + ] ) self.helm_conn._store_status.assert_called_with( cluster_id=self.cluster_id, @@ -177,7 +185,7 @@ class TestK8sHelmConn(asynctest.TestCase): "--name=stable-openldap-0005399828 --namespace testk8s stable/openldap " "--version 1.2.2" ) - self.helm_conn._local_async_exec.assert_called_once_with( + self.helm_conn._local_async_exec.assert_called_with( command=command, env=self.env, raise_exception_on_error=False ) @@ -203,8 +211,11 @@ class TestK8sHelmConn(asynctest.TestCase): self.cluster_uuid, kdu_instance, kdu_model, atomic=True, db_dict=db_dict ) self.helm_conn.fs.sync.assert_called_with(from_path=self.cluster_id) - self.helm_conn.fs.reverse_sync.assert_called_once_with( - from_path=self.cluster_id + self.helm_conn.fs.reverse_sync.assert_has_calls( + [ + asynctest.call(from_path=self.cluster_id), + asynctest.call(from_path=self.cluster_id), + ] ) self.helm_conn._store_status.assert_called_with( cluster_id=self.cluster_id, @@ -217,7 +228,7 @@ class TestK8sHelmConn(asynctest.TestCase): "env KUBECONFIG=./tmp/helm_cluster_id/.kube/config /usr/bin/helm upgrade " "--atomic --output yaml --timeout 300 stable-openldap-0005399828 stable/openldap --version 1.2.3" ) - self.helm_conn._local_async_exec.assert_called_once_with( + self.helm_conn._local_async_exec.assert_called_with( command=command, env=self.env, raise_exception_on_error=False )