Skip to content
Permalink
Browse files

WIP

  • Loading branch information...
wongma7 committed Aug 16, 2019
1 parent e0efdf2 commit d67afefed6d96eb089c385bb268b830c23acff26
Showing with 86 additions and 26 deletions.
  1. +1 −1 Makefile
  2. +3 −0 hack/feature-gates.yaml
  3. +4 −18 hack/run-e2e-test
  4. +3 −7 tests/e2e-migration/README.md
  5. +75 −0 tests/e2e-migration/go.mod
@@ -54,7 +54,7 @@ test-e2e-multi-az:

.PHONY: test-e2e-migration
test-e2e-migration:
AWS_REGION=us-west-2 AWS_AVAILABILITY_ZONES=us-west-2a GINKGO_FOCUS="\[ebs-csi-migration\]" ./hack/run-e2e-test
AWS_REGION=us-west-2 AWS_AVAILABILITY_ZONES=us-west-2a GINKGO_FOCUS="\[ebs-csi-migration\].+block.+volume-expand" ./hack/run-e2e-test

.PHONY: image-release
image-release:
@@ -7,6 +7,7 @@
CSIMigrationAWS: "true"
ExpandCSIVolumes: "true"
VolumeSnapshotDataSource: "true"
CSIInlineVolume: "true"
kubeControllerManager:
featureGates:
CSIDriverRegistry: "true"
@@ -15,6 +16,7 @@
CSIMigration: "true"
CSIMigrationAWS: "true"
ExpandCSIVolumes: "true"
CSIInlineVolume: "true"
kubelet:
featureGates:
CSIDriverRegistry: "true"
@@ -23,3 +25,4 @@
CSIMigration: "true"
CSIMigrationAWS: "true"
ExpandCSIVolumes: "true"
CSIInlineVolume: "true"
@@ -17,15 +17,15 @@
set -euo pipefail

OS_ARCH=$(go env GOOS)-amd64
TEST_ID=11027 # TODO $RANDOM
TEST_ID=$RANDOM
CLUSTER_NAME=test-cluster-$TEST_ID
TEST_DIR=/tmp/ebs-e2e-test
BASE_DIR=$(dirname $0)
REGION=${AWS_REGION-us-west-2}
ZONES=${AWS_AVAILABILITY_ZONES-us-west-2a,us-west-2b,us-west-2c}
FOCUS=${GINKGO_FOCUS-"[ebs-csi-e2e]"}
NODES=${GINKGO_NODES:-32}
K8S_VERSION=${K8S_VERSION-1.15.3-beta.0}
K8S_VERSION=${K8S_VERSION-1.16.0-alpha.3}
INSTANCE_TYPE=${INSTANCE_TYPE-c4.large}

source $(dirname "${BASH_SOURCE}")/utils/helm.sh
@@ -99,31 +99,17 @@ helm install --name aws-ebs-csi-driver \

# Run the test
if [[ "$GINKGO_FOCUS" == "\[ebs-csi-migration\]" ]]; then
DEP_DOWNLOAD_URL=https://github.com/golang/dep/releases/download/v0.5.4/dep-$OS_ARCH
DEP_PATH=$TEST_DIR/dep

# Download dep if not yet
if [[ ! -e $DEP_PATH ]]; then
mkdir -p $TEST_DIR
echo "Downloading dep from $DEP_DOWNLOAD_URL to $DEP_PATH"
curl -L -X GET $DEP_DOWNLOAD_URL -o $DEP_PATH
chmod +x $DEP_PATH
fi

pushd ./tests/e2e-migration
$DEP_PATH ensure
popd
# TODO known test failures to skip temporarily
# - should not allow expansion of pvcs without AllowVolumeExpansion property
# - Test passes but cleanup fails, need https://github.com/kubernetes/kubernetes/pull/81107
# - (block volmode) Verify if offline PVC expansion works / should resize volume when PVC is edited while pod is using it
# - NodeExpand for BlockVolumes not well-defined, need more investigation and possibly https://github.com/container-storage-interface/spec/issues/380
# - should provision storage with mount options
# - Known bug, need https://github.com/kubernetes/kubernetes/pull/80191 but not yet in a patch release
GO111MODULE=off go test -v -timeout 0 ./tests/e2e-migration/... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="$FOCUS" -ginkgo.skip="\[Disruptive\]\
go test -v -timeout 0 ./tests/e2e-migration/... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="$FOCUS" -ginkgo.skip="\[Disruptive\]\
|should.not.allow.expansion\
|block.volmode.+volume-expand\
|should.provision.storage.with.mount.options" -gce-zone=$REGION
|should.provision.storage.with.mount.options" -gce-zone=${ZONES%,*}
else
go get -u github.com/onsi/ginkgo/ginkgo
export KUBECONFIG=$HOME/.kube/config
@@ -1,11 +1,7 @@
# Prerequisites
- kubernetes 1.15+ AWS cluster
- kubernetes 1.16+ AWS cluster

# Run
```sh
dep ensure
GO111MODULE=off go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="\[ebs-csi-migration\]" -ginkgo.skip="\[Disruptive\]" -gce-zone=us-west-2
```
# FAQ
- empty `go.mod` because: https://github.com/golang/go/wiki/Modules#can-an-additional-gomod-exclude-unnecessary-content-do-modules-have-the-equivalent-of-a-gitignore-file
- kubernetes 1.15+ uses go modules, but importing the e2e framework is hard, so use vendoring via dep
go test -v -timeout 0 ./... -kubeconfig=$HOME/.kube/config -report-dir=$ARTIFACTS -ginkgo.focus="\[ebs-csi-migration\]" -ginkgo.skip="\[Disruptive\]" -gce-zone=us-west-2a
```
@@ -0,0 +1,75 @@
module github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/e2e-migration

go 1.12

require (
github.com/Microsoft/go-winio v0.4.12
github.com/aws/aws-sdk-go v1.21.10
github.com/beorn7/perks v1.0.0
github.com/coreos/etcd v3.3.13+incompatible
github.com/davecgh/go-spew v1.1.1
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c
github.com/fsnotify/fsnotify v1.4.7
github.com/gogo/protobuf v1.2.1
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
github.com/golang/protobuf v1.3.2
github.com/google/go-cmp v0.3.0
github.com/google/gofuzz v1.0.0
github.com/google/uuid v1.1.1
github.com/googleapis/gnostic v0.3.0
github.com/hashicorp/golang-lru v0.5.1
github.com/hpcloud/tail v1.0.0
github.com/imdario/mergo v0.3.7
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/json-iterator/go v1.1.6
github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/opencontainers/go-digest v1.0.0-rc1
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709
github.com/pkg/errors v0.8.1
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v1.0.0
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/prometheus/common v0.6.0
github.com/prometheus/procfs v0.0.3
github.com/spf13/afero v1.2.2
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.3.0
github.com/vmware/govmomi v0.21.0
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
golang.org/x/net v0.0.0-20190628185345-da137c7871d7
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7
golang.org/x/text v0.3.2
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
google.golang.org/appengine v1.6.1
google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610
google.golang.org/grpc v1.22.0
gopkg.in/fsnotify.v1 v1.4.7
gopkg.in/gcfg.v1 v1.2.3
gopkg.in/inf.v0 v0.9.1
gopkg.in/square/go-jose.v2 v2.3.1
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
gopkg.in/warnings.v0 v0.1.2
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20190730183008-42d28c278e58
k8s.io/apiextensions-apiserver v0.0.0-20190730184511-54a04115029c
k8s.io/apimachinery v0.0.0-20190727130956-f97a4e5b4abc
k8s.io/apiserver v0.0.0-20190730183948-6d4a1e4632b0
k8s.io/client-go v0.0.0-20190730183229-554656fd9dfc
k8s.io/cloud-provider v0.0.0-20190717025205-585d8110a88f
k8s.io/component-base v0.0.0-20190717023551-b4f50308a616
k8s.io/cri-api v0.0.0-20190711114129-0b0c4484b3d3
k8s.io/csi-translation-lib v0.0.0-20190717025251-2a445d2079de
k8s.io/klog v0.3.3
k8s.io/kube-openapi v0.0.0-20190718094010-3cf2ea392886
k8s.io/kubectl v0.0.0-20190803022817-1937123dfffc
k8s.io/kubernetes v1.16.0-alpha.2
k8s.io/legacy-cloud-providers v0.0.0-20190803062608-1ae6510dd5d3
k8s.io/utils v0.0.0-20190712204705-3dccf664f023
sigs.k8s.io/yaml v1.1.0
)

0 comments on commit d67afef

Please sign in to comment.
You can’t perform that action at this time.