X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Ftests%2Funit%2Ftest_k8s_helm_conn.py;h=5112363fb79fad9ade0028c6a6fa04d68e34378a;hb=refs%2Fchanges%2F99%2F12399%2F6;hp=fb586a3b27e7a8724df1ed71a46a6afae68d7856;hpb=069f0a310433dcfe57431fd7146ef95f87c1505d;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 fb586a3..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, @@ -170,8 +178,6 @@ class TestK8sHelmConn(asynctest.TestCase): namespace=self.namespace, db_dict=db_dict, operation="install", - run_once=True, - check_every=0, ) command = ( "env KUBECONFIG=./tmp/helm_cluster_id/.kube/config /usr/bin/helm install " @@ -179,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 ) @@ -205,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, @@ -214,14 +223,12 @@ class TestK8sHelmConn(asynctest.TestCase): namespace=self.namespace, db_dict=db_dict, operation="upgrade", - run_once=True, - check_every=0, ) command = ( "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 ) @@ -307,8 +314,6 @@ class TestK8sHelmConn(asynctest.TestCase): namespace=self.namespace, db_dict=db_dict, operation="scale", - run_once=True, - check_every=0, ) @asynctest.fail_on(active_handles=True) @@ -341,8 +346,6 @@ class TestK8sHelmConn(asynctest.TestCase): namespace=self.namespace, db_dict=db_dict, operation="rollback", - run_once=True, - check_every=0, ) command = ( "env KUBECONFIG=./tmp/helm_cluster_id/.kube/config " @@ -546,8 +549,6 @@ class TestK8sHelmConn(asynctest.TestCase): namespace=self.namespace, db_dict=db_dict, operation="install", - run_once=True, - check_every=0, ) self.helm_conn._status_kdu.assert_called_once_with( cluster_id=self.cluster_id,