Add tests for clusters
This commit is contained in:
parent
a3f0f15ffd
commit
10f7b37895
@ -456,3 +456,35 @@ func checkBootOrder(t *testing.T) builderT.TestCheckFunc {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestISOBuilderAcc_cluster(t *testing.T) {
|
||||||
|
builderT.Test(t, builderT.TestCase{
|
||||||
|
Builder: &Builder{},
|
||||||
|
Template: clusterConfig(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func clusterConfig() string {
|
||||||
|
config := defaultConfig()
|
||||||
|
config["cluster"] = "cluster1"
|
||||||
|
config["host"] = "esxi-2.vsphere65.test"
|
||||||
|
|
||||||
|
return commonT.RenderConfig(config)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestISOBuilderAcc_clusterDRS(t *testing.T) {
|
||||||
|
builderT.Test(t, builderT.TestCase{
|
||||||
|
Builder: &Builder{},
|
||||||
|
Template: clusterDRSConfig(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func clusterDRSConfig() string {
|
||||||
|
config := defaultConfig()
|
||||||
|
config["cluster"] = "cluster2"
|
||||||
|
config["host"] = ""
|
||||||
|
config["datastore"] = "datastore3" // bug #183
|
||||||
|
config["network"] = "VM Network" // bug #183
|
||||||
|
|
||||||
|
return commonT.RenderConfig(config)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user