Skip to content

Commit

Permalink
Updated ivd_protectd_entity_type_manager_test to use environment vari…
Browse files Browse the repository at this point in the history
…able VC_URL for VC info

Signed-off-by: Dave Smith-Uchida <dsmithuchida@vmware.com>
  • Loading branch information
dsu-igeek committed Aug 24, 2021
1 parent 039623b commit 77e456a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pkg/ivd/ivd_protected_entity_type_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ import (
)

func TestProtectedEntityTypeManager(t *testing.T) {
var vcUrl url.URL
vcUrl.Scheme = "https"
vcUrl.Host = "csm-wdc-vc-0.eng.vmware.com:443"
vcUrl.User = url.UserPassword("administrator@vsphere.local", "Admin!23")
vcUrl.Path = "/sdk"

vcUrlStr := os.Getenv("VC_URL")
if vcUrlStr == "" {
t.Skip("VC_URL not provided, skipping test")
}
// Example VC_URL "https://administrator%40vsphere.local:Admin%2123@csm-wdc-vc-0.eng.vmware.com:443/sdk"
vcUrl, err := url.Parse(vcUrlStr)
if err != nil {
t.Fatal(err)
}
t.Logf("%s\n", vcUrl.String())

params := make(map[string]interface{})
params[vsphere.HostVcParamKey] = vcUrl.Hostname()
params[vsphere.PortVcParamKey] = vcUrl.Port()
Expand Down

0 comments on commit 77e456a

Please sign in to comment.