Skip to content

Commit 328701a

Browse files
committed
Skip headroom tests
1 parent 6c3ea90 commit 328701a

3 files changed

Lines changed: 20 additions & 7 deletions

File tree

tests/e2e-kubernetes/e2e_test.go

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func init() {
2424
flag.StringVar(&CommitId, "commit-id", "local", "commit id will be used to name buckets")
2525
flag.StringVar(&BucketRegion, "bucket-region", "us-east-1", "region where temporary buckets will be created")
2626
flag.StringVar(&ClusterName, "cluster-name", "", "name of the cluster")
27+
flag.StringVar(&ClusterType, "cluster-type", "eksctl", "type of cluster (eksctl or openshift)")
2728
flag.StringVar(&BucketPrefix, "bucket-prefix", "local", "prefix for temporary buckets")
2829
flag.BoolVar(&Performance, "performance", false, "run performance tests")
2930
flag.BoolVar(&UpgradeTests, "run-upgrade-tests", false, "run upgrade tests")
@@ -65,22 +66,33 @@ var CSITestSuites = []func() framework.TestSuite{
6566
custom_testsuites.InitS3CSICredentialsTestSuite,
6667
custom_testsuites.InitS3CSICacheTestSuite,
6768
custom_testsuites.InitS3CSIPodSharingTestSuite,
68-
custom_testsuites.InitS3HeadroomTestSuite,
6969
custom_testsuites.InitS3TaintRemovalTestSuite,
7070
}
7171

72+
func getCSITestSuites() []func() framework.TestSuite {
73+
suites := CSITestSuites
74+
// Headroom feature is not supported on OpenShift
75+
if ClusterType != "openshift" {
76+
suites = append(suites, custom_testsuites.InitS3HeadroomTestSuite)
77+
}
78+
return suites
79+
}
80+
7281
// This executes testSuites for csi volumes.
7382
var _ = utils.SIGDescribe("CSI Volumes", func() {
83+
var testSuites []func() framework.TestSuite
7484
if Performance {
75-
CSITestSuites = []func() framework.TestSuite{custom_testsuites.InitS3CSIPerformanceTestSuite}
85+
testSuites = []func() framework.TestSuite{custom_testsuites.InitS3CSIPerformanceTestSuite}
7686
} else if UpgradeTests {
77-
CSITestSuites = []func() framework.TestSuite{custom_testsuites.InitS3CSIUpgradeTestSuite}
87+
testSuites = []func() framework.TestSuite{custom_testsuites.InitS3CSIUpgradeTestSuite}
88+
} else {
89+
testSuites = getCSITestSuites()
7890
}
7991
curDriver := initS3Driver()
8092

8193
args := framework.GetDriverNameWithFeatureTags(curDriver)
8294
args = append(args, func() {
83-
framework.DefineTestSuites(curDriver, CSITestSuites)
95+
framework.DefineTestSuites(curDriver, testSuites)
8496
})
8597
f.Context(args...)
8698
})

tests/e2e-kubernetes/scripts/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,21 @@ elif [[ "${ACTION}" == "install_driver" ]]; then
176176
elif [[ "${ACTION}" == "run_tests" ]]; then
177177
set +e
178178
pushd tests/e2e-kubernetes
179-
KUBECONFIG=${KUBECONFIG} ginkgo -p -vv --github-output -timeout 60m -- --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME}
179+
KUBECONFIG=${KUBECONFIG} ginkgo -p -vv --github-output -timeout 60m -- --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME} --cluster-type=${CLUSTER_TYPE}
180180
EXIT_CODE=$?
181181
print_cluster_info
182182
exit $EXIT_CODE
183183
elif [[ "${ACTION}" == "run_upgrade_tests" ]]; then
184184
set +e
185185
pushd tests/e2e-kubernetes
186-
KUBECONFIG=${KUBECONFIG} ginkgo -vv --github-output -timeout 10h -- --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME} --run-upgrade-tests
186+
KUBECONFIG=${KUBECONFIG} ginkgo -vv --github-output -timeout 10h -- --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME} --cluster-type=${CLUSTER_TYPE} --run-upgrade-tests
187187
EXIT_CODE=$?
188188
print_cluster_info
189189
exit $EXIT_CODE
190190
elif [[ "${ACTION}" == "run_perf" ]]; then
191191
set +e
192192
pushd tests/e2e-kubernetes
193-
KUBECONFIG=${KUBECONFIG} go test -ginkgo.vv --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --performance=true --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME}
193+
KUBECONFIG=${KUBECONFIG} go test -ginkgo.vv --bucket-region=${REGION} --commit-id=${TAG} --bucket-prefix=${CLUSTER_NAME} --performance=true --imds-available=${IMDS_AVAILABLE} --cluster-name=${CLUSTER_NAME} --cluster-type=${CLUSTER_TYPE}
194194
EXIT_CODE=$?
195195
print_cluster_info
196196
popd

tests/e2e-kubernetes/testdriver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var (
1818
CommitId string
1919
BucketRegion string // assumed to be the same as k8s cluster's region
2020
ClusterName string
21+
ClusterType string
2122
BucketPrefix string
2223
Performance bool
2324
UpgradeTests bool

0 commit comments

Comments
 (0)