-
Notifications
You must be signed in to change notification settings - Fork 849
Run upstream e2e test suites with migration #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
leakingtapan
merged 1 commit into
kubernetes-sigs:master
from
wongma7:e2e-migration-real
Aug 27, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Run upstream e2e test suites with migration
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Prerequisites | ||
| - kubernetes 1.16+ AWS cluster | ||
|
|
||
| # Run | ||
| ```sh | ||
| 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 | ||
| ``` | ||
|
|
||
| # Update dependencies | ||
| ```sh | ||
| go mod edit -require=k8s.io/[email protected] | ||
| ./hack/update-gomod.sh v1.15.3 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| /* | ||
| Copyright 2018 The Kubernetes Authors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package e2e | ||
|
|
||
| import ( | ||
| "flag" | ||
| "fmt" | ||
| "log" | ||
| "os" | ||
| "path" | ||
| "path/filepath" | ||
| "testing" | ||
|
|
||
| "github.com/onsi/ginkgo" | ||
| "github.com/onsi/ginkgo/config" | ||
| "github.com/onsi/ginkgo/reporters" | ||
| "github.com/onsi/gomega" | ||
| "k8s.io/kubernetes/test/e2e/framework" | ||
| "k8s.io/kubernetes/test/e2e/storage/drivers" | ||
| "k8s.io/kubernetes/test/e2e/storage/testsuites" | ||
|
|
||
| // ensure that cloud provider is loaded | ||
| _ "k8s.io/kubernetes/test/e2e/framework/providers/aws" | ||
| ) | ||
|
|
||
| const kubeconfigEnvVar = "KUBECONFIG" | ||
|
|
||
| func init() { | ||
| // k8s.io/kubernetes/test/e2e/framework requires env KUBECONFIG to be set | ||
| // it does not fall back to defaults | ||
| if os.Getenv(kubeconfigEnvVar) == "" { | ||
| kubeconfig := filepath.Join(os.Getenv("HOME"), ".kube", "config") | ||
| os.Setenv(kubeconfigEnvVar, kubeconfig) | ||
| } | ||
| framework.RegisterCommonFlags(flag.CommandLine) | ||
| framework.RegisterClusterFlags(flag.CommandLine) | ||
| _ = flag.Set("storage.migratedPlugins", "kubernetes.io/aws-ebs") | ||
| _ = flag.Set("provider", "aws") | ||
| flag.Parse() | ||
| framework.AfterReadingAllFlags(&framework.TestContext) | ||
| } | ||
|
|
||
| func TestEBSCSI(t *testing.T) { | ||
| gomega.RegisterFailHandler(ginkgo.Fail) | ||
|
|
||
| // Run tests through the Ginkgo runner with output to console + JUnit for Jenkins | ||
| var r []ginkgo.Reporter | ||
| if framework.TestContext.ReportDir != "" { | ||
| if err := os.MkdirAll(framework.TestContext.ReportDir, 0755); err != nil { | ||
| log.Fatalf("Failed creating report directory: %v", err) | ||
| } else { | ||
| r = append(r, reporters.NewJUnitReporter(path.Join(framework.TestContext.ReportDir, fmt.Sprintf("junit_%v%02d.xml", framework.TestContext.ReportPrefix, config.GinkgoConfig.ParallelNode)))) | ||
| } | ||
| } | ||
| log.Printf("Starting e2e run %q on Ginkgo node %d", framework.RunID, config.GinkgoConfig.ParallelNode) | ||
|
|
||
| ginkgo.RunSpecsWithDefaultAndCustomReporters(t, "EBS CSI Migration Suite", r) | ||
| } | ||
|
|
||
| // List of testSuites to be executed in below loop | ||
| var csiTestSuites = []func() testsuites.TestSuite{ | ||
| testsuites.InitVolumesTestSuite, | ||
| testsuites.InitVolumeIOTestSuite, | ||
| testsuites.InitVolumeModeTestSuite, | ||
| testsuites.InitSubPathTestSuite, | ||
| testsuites.InitProvisioningTestSuite, | ||
| testsuites.InitSnapshottableTestSuite, | ||
| testsuites.InitVolumeExpandTestSuite, | ||
| testsuites.InitMultiVolumeTestSuite, | ||
| } | ||
|
|
||
| var _ = ginkgo.Describe("[ebs-csi-migration] EBS CSI Migration", func() { | ||
| // Init the *in-tree* driver. | ||
| // The CSIMigration & CSIMigrationAWS feature gates must be enabled on the cluster. | ||
| // The storage.migratedPlugins flag must be set to "kubernetes.io/aws-ebs". Then the tests will | ||
| // validate that CSI, not in-tree, operations are happening. | ||
| driver := drivers.InitAwsDriver() | ||
| ginkgo.Context(testsuites.GetDriverNameWithFeatureTags(driver), func() { | ||
| testsuites.DefineTestSuite(driver, csiTestSuites) | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| module github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/e2e-migration | ||
|
|
||
| go 1.12 | ||
|
|
||
| replace k8s.io/api => k8s.io/api v0.0.0-20190822053644-6185379c914a | ||
|
|
||
| replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190822063004-0670dc4fec4e | ||
|
|
||
| replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190820074809-31b1e1ea64dc | ||
|
|
||
| replace k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190822060508-785eacbd19ae | ||
|
|
||
| replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190822063658-442a64f3fed7 | ||
|
|
||
| replace k8s.io/client-go => k8s.io/client-go v0.0.0-20190822054823-0a74433fb222 | ||
|
|
||
| replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190822065847-2058b41dfbb6 | ||
|
|
||
| replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190822065536-566e5fc137f7 | ||
|
|
||
| replace k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190820100630-060a3d12ce80 | ||
|
|
||
| replace k8s.io/component-base => k8s.io/component-base v0.0.0-20190822055535-1f6a258f5d89 | ||
|
|
||
| replace k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190820110325-95eec93e2395 | ||
|
|
||
| replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190822070154-f51cd605b3ee | ||
|
|
||
| replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190822061015-a4f93a8219ed | ||
|
|
||
| replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190822065235-826221481525 | ||
|
|
||
| replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190822064323-7e0495d8a3ff | ||
|
|
||
| replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190822064931-4470440ed041 | ||
|
|
||
| replace k8s.io/kubectl => k8s.io/kubectl v0.0.0-20190822071625-14af4a63a1e1 | ||
|
|
||
| replace k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190822064626-fa8f3d935631 | ||
|
|
||
| replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190822070624-3a30a18bba71 | ||
|
|
||
| replace k8s.io/metrics => k8s.io/metrics v0.0.0-20190822063337-6c03eb8600ee | ||
|
|
||
| replace k8s.io/node-api => k8s.io/node-api v0.0.0-20190822070940-24e163ffb9e7 | ||
|
|
||
| replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190822061642-ab22eab63834 | ||
|
|
||
| replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.0.0-20190822064016-bcca3cc588da | ||
|
|
||
| replace k8s.io/sample-controller => k8s.io/sample-controller v0.0.0-20190822062306-1b561d990eb5 | ||
|
|
||
| require ( | ||
| github.com/onsi/ginkgo v1.9.0 | ||
| github.com/onsi/gomega v1.6.0 | ||
| k8s.io/kubernetes v1.16.0-beta.1 | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.