diff --git a/acto/kubernetes_engine/minikube.py b/acto/kubernetes_engine/minikube.py index 400bd7c965..648dffe270 100644 --- a/acto/kubernetes_engine/minikube.py +++ b/acto/kubernetes_engine/minikube.py @@ -61,7 +61,7 @@ def create_cluster(self, name: str, kubeconfig: str): else: raise RuntimeError("Missing kubeconfig for minikube create") - cmd.extend(["--nodes", str(self.num_nodes)]) + cmd.extend(["--nodes", str(self.num_nodes + 1)]) if self._k8s_version != "": cmd.extend(["--kubernetes-version", str(self._k8s_version)]) diff --git a/test/integration_tests/test_kubernetes_engines.py b/test/integration_tests/test_kubernetes_engines.py index 477caf3b2b..187481f97c 100644 --- a/test/integration_tests/test_kubernetes_engines.py +++ b/test/integration_tests/test_kubernetes_engines.py @@ -8,7 +8,7 @@ from acto.kubernetes_engine.kind import Kind from acto.kubernetes_engine.minikube import Minikube -testcases = [("kind", 3, "v1.27.3")] +testcases = [("kind", 4, "v1.27.3")] @pytest.mark.kubernetes_engine @@ -34,7 +34,7 @@ def test_kubernetes_engines(cluster_type: str, num_nodes, version): cluster_instance.create_cluster(name, config_path) node_list = cluster_instance.get_node_list(name) - assert len(node_list) == num_nodes + assert len(node_list) == num_nodes + 1 cluster_instance.delete_cluster(name, config_path) with pytest.raises(RuntimeError):