Skip to content

Commit

Permalink
Change test to suit older version NSX (#986)
Browse files Browse the repository at this point in the history
Signed-off-by: graysonwu <[email protected]>
  • Loading branch information
GraysonWu authored Oct 10, 2023
1 parent 6ed3a27 commit 23f2b83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion nsxt/data_source_nsxt_transport_zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ func TestAccDataSourceNsxtTransportZone_basic(t *testing.T) {
testResourceName := "data.nsxt_transport_zone.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccOnlyLocalManager(t); testAccTestDeprecated(t); testAccPreCheck(t) },
PreCheck: func() {
testAccOnlyLocalManager(t)
testAccTestDeprecated(t)
testAccPreCheck(t)
testAccNSXVersion(t, "4.0.0")
},
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down
1 change: 1 addition & 0 deletions nsxt/resource_nsxt_logical_dhcp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func getDhcpOptions121Schema() *schema.Schema {
Type: schema.TypeList,
Description: "DHCP classless static routes",
Optional: true,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"network": {
Expand Down
5 changes: 3 additions & 2 deletions nsxt/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import (
// Default names or prefixed of NSX backend existing objects used in the acceptance tests.
// Those defaults can be overridden using environment parameters
const tier0RouterDefaultName string = "PLR-1 LogicalRouterTier0"
const edgeClusterDefaultName string = "edgecluster1"
const edgeClusterDefaultName string = "EDGECLUSTER1"
const computeCollectionDefaultName string = "Cluster-1"
const vlanTransportZoneName string = "transportzone2"
const overlayTransportZoneNamePrefix string = "1-transportzone"
const macPoolDefaultName string = "DefaultMacPool"
Expand Down Expand Up @@ -117,7 +118,7 @@ func getEdgeClusterName() string {
func getComputeCollectionName() string {
name := os.Getenv("NSXT_TEST_COMPUTE_COLLECTION")
if name == "" {
name = edgeClusterDefaultName
name = computeCollectionDefaultName
}
return name
}
Expand Down

0 comments on commit 23f2b83

Please sign in to comment.