Skip to content

Commit

Permalink
PWX-31962: Fixing up test name and provider logic (#1161)
Browse files Browse the repository at this point in the history
TestStorageClusterBasicDMthin has the same prefix with another test
    TestStorageClusterBasic. This is causing the dmthin test to run in
    unintended jenkins jobs.

    There is an additional way of knowing the provider which is to use
    the value from --cloud-provider

Signed-off-by: Naveen Revanna <nrevanna@purestorage.com>
  • Loading branch information
nrevanna committed Jul 24, 2023
1 parent 9b862bc commit e4f90a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/integration_test/basic_dmthin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var testDmthinCases = []types.TestCase{
},
}

func TestStorageClusterBasicDMthin(t *testing.T) {
func TestDMthinCloudDrivesBasic(t *testing.T) {
for _, testCase := range testDmthinCases {
testCase.RunTest(t)
}
Expand Down
4 changes: 3 additions & 1 deletion test/integration_test/cloud_provider/cloud_drive.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cloud_provider

import (
"github.com/libopenstorage/cloudops"
"github.com/libopenstorage/operator/test/integration_test/utils"
"log"
"strings"
Expand All @@ -21,7 +22,8 @@ func stringPtr(str string) *string {
}

func isVsphere() bool {
return strings.Contains(utils.PxEnvVars, "VSPHERE_VCENTER")
return strings.Contains(utils.PxEnvVars, "VSPHERE_VCENTER") ||
utils.CloudProvider == cloudops.Vsphere
}

func GetCloudProvider() Provider {
Expand Down

0 comments on commit e4f90a4

Please sign in to comment.