diff --git a/go.sum b/go.sum index c510acfd2..f6ff6775d 100644 --- a/go.sum +++ b/go.sum @@ -43,12 +43,10 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/gibson042/canonicaljson-go v1.0.3 h1:EAyF8L74AWabkyUmrvEFHEt/AGFQeD6RfwbAuf0j1bI= github.com/gibson042/canonicaljson-go v1.0.3/go.mod h1:DsLpJTThXyGNO+KZlI85C1/KDcImpP67k/RKVjcaEqo= -github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/nsxt/data_source_nsxt_policy_edge_node.go b/nsxt/data_source_nsxt_policy_edge_node.go index 95ac3b4ff..0e6a5dad4 100644 --- a/nsxt/data_source_nsxt_policy_edge_node.go +++ b/nsxt/data_source_nsxt_policy_edge_node.go @@ -38,7 +38,8 @@ func dataSourceNsxtPolicyEdgeNodeRead(d *schema.ResourceData, m interface{}) err edgeClusterPath := d.Get("edge_cluster_path").(string) // Note - according to the documentation GetOkExists should be used // for bool types, but in this case it works and GetOk doesn't - memberIndex, memberIndexSet := d.GetOkExists("member_index") + + memberIndex, memberIndexSet := d.GetOk("member_index") if isPolicyGlobalManager(m) { query := make(map[string]string) diff --git a/nsxt/resource_nsxt_ip_pool_allocation_ip_address_test.go b/nsxt/resource_nsxt_ip_pool_allocation_ip_address_test.go index dee3a03ed..37e749083 100644 --- a/nsxt/resource_nsxt_ip_pool_allocation_ip_address_test.go +++ b/nsxt/resource_nsxt_ip_pool_allocation_ip_address_test.go @@ -22,7 +22,7 @@ var testAccIPPoolName = "data.nsxt_ip_pool.acceptance_test" func TestAccResourceNsxtIPPoolAllocationIPAddress_basic(t *testing.T) { resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccEnvDefined(t, "NSXT_TEST_IP_POOL"); testAccOnlyLocalManager(t) }, + PreCheck: func() { testAccOnlyLocalManager(t); testAccPreCheck(t); testAccEnvDefined(t, "NSXT_TEST_IP_POOL") }, Providers: testAccProviders, CheckDestroy: func(state *terraform.State) error { return testAccNSXIPPoolAllocationIPAddressCheckDestroy(state) diff --git a/nsxt/resource_nsxt_policy_tier0_gateway.go b/nsxt/resource_nsxt_policy_tier0_gateway.go index cb7c9e68a..4c419bd74 100644 --- a/nsxt/resource_nsxt_policy_tier0_gateway.go +++ b/nsxt/resource_nsxt_policy_tier0_gateway.go @@ -757,7 +757,6 @@ func policyTier0GatewayResourceToInfraStruct(d *schema.ResourceData, connector * gwChildren = append(gwChildren, dataValue) } - // Global Manager case - multiple locale services. BGP not supported yet. if isGlobalManager { localeServices, err := initGatewayLocaleServices(d, connector, listPolicyTier0GatewayLocaleServices) if err != nil { diff --git a/nsxt/utils_test.go b/nsxt/utils_test.go index 9151ca216..b5c480561 100644 --- a/nsxt/utils_test.go +++ b/nsxt/utils_test.go @@ -137,12 +137,6 @@ func testAccNSXGlobalManagerSitePrecheck(t *testing.T) { } } -func testAccSkipIfIsLocalManager(t *testing.T) { - if !testAccIsGlobalManager() { - t.Skipf("This test is for global manager only") - } -} - // Create and delete CA and client cert for various tests func testAccNSXCreateCert(t *testing.T, name string, certPem string, certPK string, certType string) string { nsxClient, err := testAccGetClient()