From 35d681444c61352e9e878bf62c35a527be09b15c Mon Sep 17 00:00:00 2001 From: bugbuilder Date: Sun, 9 Jul 2017 22:13:31 -0400 Subject: [PATCH] format --- post-processor/vsphere-tpl/post-processor.go | 2 +- .../vsphere-tpl/post_processor_test.go | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/post-processor/vsphere-tpl/post-processor.go b/post-processor/vsphere-tpl/post-processor.go index 07f749c3f..b5fc59325 100644 --- a/post-processor/vsphere-tpl/post-processor.go +++ b/post-processor/vsphere-tpl/post-processor.go @@ -4,8 +4,8 @@ import ( "context" "fmt" "net/url" - "time" "strings" + "time" "github.com/hashicorp/packer/common" "github.com/hashicorp/packer/helper/config" diff --git a/post-processor/vsphere-tpl/post_processor_test.go b/post-processor/vsphere-tpl/post_processor_test.go index 2b48c6401..34675b16c 100644 --- a/post-processor/vsphere-tpl/post_processor_test.go +++ b/post-processor/vsphere-tpl/post_processor_test.go @@ -1 +1,19 @@ package vsphere_tpl + +import ( + "testing" +) + +func TestConfigureURL(t *testing.T) { + var p PostProcessor + p.config.Username = "me" + p.config.Password = "notpassword" + p.config.Host = "myhost" + p.config.Datacenter = "mydc" + p.config.VMName = "my vm" + p.config.Insecure = true + + if err := p.configureURL(); err == nil { + t.Errorf("Error: %s", err) + } +}