Update helm repo after adding the repo
[osm/N2VC.git] / n2vc / tests / unit / test_k8s_helm_conn.py
index 736405f..ae9338d 100644 (file)
@@ -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)