Skip to content

Commit

Permalink
Run all testsuites.CSISuites instead of listing each
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Apr 7, 2021
1 parent 87e2426 commit 7e5987d
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions tests/e2e-kubernetes/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func init() {
}
framework.RegisterCommonFlags(flag.CommandLine)
framework.RegisterClusterFlags(flag.CommandLine)
_ = flag.Set("storage.migratedPlugins", "kubernetes.io/aws-ebs")
// TODO wongma7 set this when the metrics check bug has been fixed
// _ = flag.Set("storage.migratedPlugins", "kubernetes.io/aws-ebs")
_ = flag.Set("provider", "aws")
flag.Parse()
framework.AfterReadingAllFlags(&framework.TestContext)
Expand All @@ -78,25 +79,13 @@ func TestEBSCSI(t *testing.T) {
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)
testsuites.DefineTestSuite(driver, testsuites.CSISuites)
})
})

0 comments on commit 7e5987d

Please sign in to comment.