Commit 16295dfb authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: tests for vnc_port_* settings

parent 7a5dce0d
* builder/amazonebs: Copy AMI to multiple regions
* builder/amazonebs: Add unique ID to AMI name so multiple can be made
* builder/vmware: Downloading the ISO
* builder/vmware: Find open port for HTTP/VNC
* builder/vmware: Find open port for HTTP
* builder/vmware: VMX templates
* builder/vmware: VMX key/values
* communicator/ssh: Ability to re-establish connection
......
......@@ -137,3 +137,31 @@ func TestBuilderPrepare_SSHWaitTimeout(t *testing.T) {
t.Fatalf("should not have error: %s", err)
}
}
func TestBuilderPrepare_VNCPort(t *testing.T) {
var b Builder
config := testConfig()
// Bad
config["vnc_port_min"] = 1000
config["vnc_port_max"] = 500
err := b.Prepare(config)
if err == nil {
t.Fatal("should have error")
}
// Bad
config["vnc_port_min"] = -500
err = b.Prepare(config)
if err == nil {
t.Fatal("should have error")
}
// Good
config["vnc_port_min"] = 500
config["vnc_port_max"] = 1000
err = b.Prepare(config)
if err != nil {
t.Fatalf("should not have error: %s", err)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment