Skip to content

Commit

Permalink
Merge pull request #895 from andyzhangx/enable-sts-test
Browse files Browse the repository at this point in the history
test: re-renable statefulset e2e test
  • Loading branch information
andyzhangx authored Jun 16, 2021
2 parents 8d85fa4 + 67d0389 commit 827c892
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
27 changes: 27 additions & 0 deletions deploy/example/nginx-pod-azuredisk-inline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
kind: Pod
apiVersion: v1
metadata:
name: nginx-azuredisk-inline
spec:
containers:
- name: nginx-azuredisk-inline
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine
command:
- "/bin/sh"
- "-c"
- while true; do echo $(date) >> /mnt/azuredisk/outfile; sleep 1; done
volumeMounts:
- mountPath: "/mnt/azuredisk"
name: azuredisk01
volumes:
- name: azuredisk01
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: managed-csi
3 changes: 0 additions & 3 deletions test/e2e/dynamic_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,6 @@ func (t *dynamicProvisioningTestSuite) defineTests(isMultiZone bool) {
})

ginkgo.It("should create a statefulset object, write and read to it, delete the pod and write and read to it again [kubernetes.io/azure-disk] [disk.csi.azure.com] [Windows]", func() {
if isWindowsCluster && isUsingInTreeVolumePlugin {
ginkgo.Skip("test case has been disabled for Windows in-tree driver")
}
pod := testsuites.PodDetails{
Cmd: convertToPowershellorCmdCommandIfNecessary("echo 'hello world' >> /mnt/test-1/data && while true; do sleep 3600; done"),
Volumes: t.normalizeVolumes([]testsuites.VolumeDetails{
Expand Down
8 changes: 0 additions & 8 deletions test/e2e/testsuites/testsuites.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,6 @@ func (t *TestPersistentVolumeClaim) ValidateProvisionedPersistentVolume() {
gomega.Expect(t.persistentVolume.Spec.NodeAffinity.Required.NodeSelectorTerms[0].MatchExpressions[0].Values).
To(gomega.HaveLen(1))
}
if len(t.storageClass.AllowedTopologies) > 0 {
gomega.Expect(t.persistentVolume.Spec.NodeAffinity.Required.NodeSelectorTerms[0].MatchExpressions[0].Key).
To(gomega.Equal(t.storageClass.AllowedTopologies[0].MatchLabelExpressions[0].Key))
for _, v := range t.persistentVolume.Spec.NodeAffinity.Required.NodeSelectorTerms[0].MatchExpressions[0].Values {
gomega.Expect(t.storageClass.AllowedTopologies[0].MatchLabelExpressions[0].Values).To(gomega.ContainElement(v))
}

}
}
}

Expand Down

0 comments on commit 827c892

Please sign in to comment.