Skip to content

Commit fd8bcae

Browse files
add simple wait tf test
1 parent f40c0d8 commit fd8bcae

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

minikube/resource_cluster_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ func TestClusterHA(t *testing.T) {
8080
},
8181
})
8282
}
83+
func TestClusterWait(t *testing.T) {
84+
resource.Test(t, resource.TestCase{
85+
IsUnitTest: true,
86+
Providers: map[string]*schema.Provider{"minikube": NewProvider(mockSuccess(mockClusterClientProperties{t, "TestClusterCreationWait", 1, 0}))},
87+
Steps: []resource.TestStep{
88+
{
89+
Config: testUnitClusterWaitConfig("some_driver", "TestClusterCreationWait"),
90+
},
91+
},
92+
})
93+
}
8394

8495
func TestClusterCreation_Docker(t *testing.T) {
8596
resource.Test(t, resource.TestCase{
@@ -522,6 +533,17 @@ func testUnitClusterHAConfig(driver string, clusterName string) string {
522533
`, driver, clusterName)
523534
}
524535

536+
func testUnitClusterWaitConfig(driver string, clusterName string) string {
537+
return fmt.Sprintf(`
538+
resource "minikube_cluster" "new" {
539+
driver = "%s"
540+
cluster_name = "%s"
541+
542+
wait = [ "apiserver" ]
543+
}
544+
`, driver, clusterName)
545+
}
546+
525547
func testUnitClusterConfig_Update(driver string, clusterName string) string {
526548
return fmt.Sprintf(`
527549
resource "minikube_cluster" "new" {

0 commit comments

Comments
 (0)