Skip to content

Commit

Permalink
Merge pull request #845 from andyzhangx/zrs-test
Browse files Browse the repository at this point in the history
test: add ZRS e2e test
  • Loading branch information
andyzhangx authored May 14, 2021
2 parents 418aaf9 + a4ab9c6 commit 6456c0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/e2e/dynamic_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
Pods: pods,
StorageClassParameters: map[string]string{"skuName": "StandardSSD_LRS"},
}
if !isUsingInTreeVolumePlugin && (location == "westus2" || location == "westeurope") {
test.StorageClassParameters = map[string]string{"skuName": "StandardSSD_ZRS"}
}
if isAzureStackCloud {
test.StorageClassParameters = map[string]string{"skuName": "Standard_LRS"}
}
Expand Down Expand Up @@ -223,6 +226,9 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
Pods: pods,
StorageClassParameters: map[string]string{"skuName": "StandardSSD_LRS"},
}
if !isUsingInTreeVolumePlugin && (location == "westus2" || location == "westeurope") {
test.StorageClassParameters = map[string]string{"skuName": "Premium_ZRS"}
}
if isAzureStackCloud {
test.StorageClassParameters = map[string]string{"skuName": "Standard_LRS"}
}
Expand Down Expand Up @@ -636,7 +642,7 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
test.Run(cs, ns)
})

ginkgo.It("should create a volume azuredisk with tag [disk.csi.azure.com] [Windows]", func() {
ginkgo.It("should create a volume azuredisk with tag [disk.csi.azure.com] [Windows]", func() {
skipIfUsingInTreeVolumePlugin()
pods := []testsuites.PodDetails{
{
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var (
isTestingMigration = os.Getenv(testMigrationEnvVar) != ""
isWindowsCluster = os.Getenv(testWindowsEnvVar) != ""
isAzureStackCloud = strings.EqualFold(os.Getenv(cloudNameEnvVar), "AZURESTACKCLOUD")
location string
)

type testCmd struct {
Expand Down Expand Up @@ -85,6 +86,8 @@ var _ = ginkgo.BeforeSuite(func() {
_, err = azureClient.EnsureResourceGroup(context.Background(), creds.ResourceGroup, creds.Location, nil)
gomega.Expect(err).NotTo(gomega.HaveOccurred())

location = creds.Location

// Install Azure Disk CSI Driver on cluster from project root
e2eBootstrap := testCmd{
command: "make",
Expand Down

0 comments on commit 6456c0a

Please sign in to comment.