Skip to content

Commit

Permalink
1. use e2e.test v1.26.0
Browse files Browse the repository at this point in the history
2. upgrade ginkgo to v2.9.2 to use GinkgoHelper
3. add --fast-fail
  • Loading branch information
cvvz committed Mar 29, 2023
1 parent d6d05ea commit 1496638
Show file tree
Hide file tree
Showing 215 changed files with 15,729 additions and 1,035 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ e2e-test: install-ginkgo
if [ ! -z "$(EXTERNAL_E2E_TEST_BLOBFUSE)" ] || [ ! -z "$(EXTERNAL_E2E_TEST_BLOBFUSE_v2)" ] || [ ! -z "$(EXTERNAL_E2E_TEST_NFS)" ]; then \
bash ./test/external-e2e/run.sh;\
else \
ginkgo -p -v ./test/e2e;\
ginkgo -p -v --fail-fast ./test/e2e;\
fi

.PHONY: e2e-bootstrap
Expand Down
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ require (
github.com/container-storage-interface/spec v1.7.0
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.3
github.com/imdario/mergo v0.3.9 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.9.1
github.com/onsi/gomega v1.25.0
github.com/onsi/gomega v1.27.4
github.com/pborman/uuid v1.2.0
github.com/pelletier/go-toml v1.9.4
github.com/stretchr/testify v1.8.2
golang.org/x/net v0.7.0
golang.org/x/net v0.8.0
google.golang.org/grpc v1.49.0
google.golang.org/protobuf v1.28.1
k8s.io/api v0.26.0
Expand All @@ -39,7 +39,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1
github.com/go-ini/ini v1.67.0
github.com/jongio/azidext/go/azidext v0.4.0
github.com/onsi/ginkgo/v2 v2.7.0
github.com/onsi/ginkgo/v2 v2.9.2
github.com/pkg/errors v0.9.1
github.com/satori/go.uuid v1.2.0
k8s.io/apiserver v0.26.0
Expand Down Expand Up @@ -70,12 +70,14 @@ require (
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
Expand Down Expand Up @@ -111,10 +113,11 @@ require (
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -132,7 +135,6 @@ require (

replace (
github.com/niemeyer/pretty => github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.4.0
go.etcd.io/etcd => go.etcd.io/etcd v0.0.0-20200410171415-59f5fb25a533
k8s.io/api => k8s.io/api v0.26.0
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.26.0
Expand Down
59 changes: 50 additions & 9 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ func TestE2E(t *testing.T) {
}

func execTestCmd(cmds []testCmd) {
// Any function in which GinkgoHelper() is called is tracked by Ginkgo and ignored when a failure location is being computed.
// This allows you to build reusable test helpers and trust that the location presented to the user will always be in the spec that called the helper, and not the helper itself.
ginkgo.GinkgoHelper()

err := os.Chdir("../..")
gomega.Expect(err).NotTo(gomega.HaveOccurred())
defer func() {
Expand Down
8 changes: 4 additions & 4 deletions test/external-e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DRIVER="test"

setup_e2e_binaries() {
# download k8s external e2e binary
curl -sL https://storage.googleapis.com/kubernetes-release/release/v1.24.0/kubernetes-test-linux-amd64.tar.gz --output e2e-tests.tar.gz
curl -sL https://storage.googleapis.com/kubernetes-release/release/v1.26.0/kubernetes-test-linux-amd64.tar.gz --output e2e-tests.tar.gz
tar -xvf e2e-tests.tar.gz && rm e2e-tests.tar.gz

export EXTRA_HELM_OPTIONS="--set driver.name=$DRIVER.csi.azure.com --set controller.name=csi-$DRIVER-controller --set node.name=csi-$DRIVER-node --set driver.azureGoSDKLogLevel=INFO"
Expand Down Expand Up @@ -55,7 +55,7 @@ if [ ! -z ${EXTERNAL_E2E_TEST_BLOBFUSE} ]; then
cp deploy/example/storageclass-blobfuse.yaml /tmp/csi/storageclass.yaml
# achieve close-to-open cache consistency like in NFSv3
sed -i 's/file-cache-timeout-in-seconds=120/file-cache-timeout-in-seconds=0/g' /tmp/csi/storageclass.yaml
ginkgo -p -v -focus="External.Storage.*$DRIVER.csi.azure.com" \
ginkgo -p -v --fail-fast -focus="External.Storage.*$DRIVER.csi.azure.com" \
-skip='\[Disruptive\]|allow exec of files on the volume|unmount after the subpath directory is deleted|should concurrently access the single volume from pods on different node|pod created with an initial fsgroup, volume contents ownership changed via chgrp in first pod, new pod with same fsgroup skips ownership changes to the volume contents|should provision storage with any volume data source|should mount multiple PV pointing to the same storage on the same node' kubernetes/test/bin/e2e.test -- \
-storage.testdriver=$PROJECT_ROOT/test/external-e2e/testdriver-blobfuse.yaml \
--kubeconfig=$KUBECONFIG
Expand All @@ -66,7 +66,7 @@ if [ ! -z ${EXTERNAL_E2E_TEST_BLOBFUSE_v2} ]; then
cp deploy/example/storageclass-blobfuse2.yaml /tmp/csi/storageclass.yaml
# achieve close-to-open cache consistency like in NFSv3
sed -i 's/file-cache-timeout-in-seconds=120/file-cache-timeout-in-seconds=0/g' /tmp/csi/storageclass.yaml
ginkgo -p -v -focus="External.Storage.*$DRIVER.csi.azure.com" \
ginkgo -p -v --fail-fast -focus="External.Storage.*$DRIVER.csi.azure.com" \
-skip='\[Disruptive\]|allow exec of files on the volume|unmount after the subpath directory is deleted|should concurrently access the single volume from pods on different node|pod created with an initial fsgroup, volume contents ownership changed via chgrp in first pod, new pod with same fsgroup skips ownership changes to the volume contents|should provision storage with any volume data source|should mount multiple PV pointing to the same storage on the same node' kubernetes/test/bin/e2e.test -- \
-storage.testdriver=$PROJECT_ROOT/test/external-e2e/testdriver-blobfuse.yaml \
--kubeconfig=$KUBECONFIG
Expand All @@ -75,7 +75,7 @@ fi
if [ ! -z ${EXTERNAL_E2E_TEST_NFS} ]; then
echo "begin to run NFSv3 tests ...."
cp deploy/example/storageclass-blob-nfs.yaml /tmp/csi/storageclass.yaml
ginkgo -p -v -focus="External.Storage.*$DRIVER.csi.azure.com" \
ginkgo -p -v --fail-fast -focus="External.Storage.*$DRIVER.csi.azure.com" \
-skip='\[Disruptive\]|should concurrently access the single volume from pods on different node|pod created with an initial fsgroup, volume contents ownership changed via chgrp in first pod, new pod with same fsgroup skips ownership changes to the volume contents|should provision storage with any volume data source|should mount multiple PV pointing to the same storage on the same node|should access to two volumes with the same volume mode and retain data across pod recreation on different node' kubernetes/test/bin/e2e.test -- \
-storage.testdriver=$PROJECT_ROOT/test/external-e2e/testdriver-nfs.yaml \
--kubeconfig=$KUBECONFIG
Expand Down
14 changes: 14 additions & 0 deletions vendor/github.com/go-task/slim-sprig/.editorconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/go-task/slim-sprig/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/go-task/slim-sprig/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1496638

Please sign in to comment.