Skip to content

Commit

Permalink
Support testing of non-clustered ESXi nodes.
Browse files Browse the repository at this point in the history
A topology where compute ESXi nodes are not a part of a compute cluster
should be a usable use case with acceptance tests.

Signed-off-by: Kobi Samoray <[email protected]>
  • Loading branch information
ksamoray committed Mar 6, 2024
1 parent 32cd2c4 commit 9ecd334
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion nsxt/data_source_nsxt_compute_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ func TestAccDataSourceNsxtComputeCollection_basic(t *testing.T) {
testResourceName := "data.nsxt_compute_collection.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccOnlyLocalManager(t); testAccPreCheck(t) },
PreCheck: func() {
testAccOnlyLocalManager(t)
testAccPreCheck(t)
testAccEnvDefined(t, "NSXT_TEST_COMPUTE_COLLECTION")
},
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Expand Down
7 changes: 1 addition & 6 deletions nsxt/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
// Those defaults can be overridden using environment parameters
const tier0RouterDefaultName string = "PLR-1 LogicalRouterTier0"
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 @@ -124,11 +123,7 @@ func getEdgeClusterName() string {
}

func getComputeCollectionName() string {
name := os.Getenv("NSXT_TEST_COMPUTE_COLLECTION")
if name == "" {
name = computeCollectionDefaultName
}
return name
return os.Getenv("NSXT_TEST_COMPUTE_COLLECTION")
}

func getComputeManagerName() string {
Expand Down

0 comments on commit 9ecd334

Please sign in to comment.