Skip to content

Commit

Permalink
Add testcase for load image minikube
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeng21 committed Oct 9, 2023
1 parent 32a9962 commit 41587fe
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions acto/kubernetes_engine/test_minikube.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,29 @@

def test_minikube_create():
num_nodes = 3
name = "test1"
cluster = minikube.Minikube(acto_namespace = 0, num_nodes=num_nodes, version="v1.27.4")
name = "hz"
version = "v1.27.4"
cluster = minikube.Minikube(acto_namespace = 0, num_nodes=num_nodes, version=version)
cluster.create_cluster(name, "/users/hzeng21/.kube/config2")
node_list = cluster.get_node_list(name)
assert len(node_list) == num_nodes


def test_minikube_delete():
num_nodes = 3
name = "test2"
cluster = minikube.Minikube(acto_namespace = 0, num_nodes=num_nodes, version="v1.27.4")
cluster.create_cluster(name, "/users/hzeng21/.kube/config2")
name = "hz"
version = "v1.31.2"
cluster = minikube.Minikube(acto_namespace = 0, num_nodes=num_nodes, version=version)
# cluster.create_cluster(name, "/users/hzeng21/.kube/config2")
cluster.delete_cluster(name, "/users/hzeng21/.kube/config2")
# should raise a runtime error
cluster.get_node_list(name)


def test_minikube_load_image():
num_nodes = 3
name = "hz"
version = "v1.31.2"
cluster = minikube.Minikube(acto_namespace = 0, num_nodes=num_nodes, version=version)
# cluster.create_cluster(name, "/users/hzeng21/.kube/config2")
cluster.load_images("/users/hzeng21/.kube/sleepy.tar", name=name)

0 comments on commit 41587fe

Please sign in to comment.