Skip testing the in-tree aws-ebs driver if CSI driver is enabled

This commit is contained in:
Ole Markus With 2022-08-10 13:38:42 +02:00
parent 7669cd0004
commit cfc4e504d0
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/utils" "k8s.io/kops/upup/pkg/fi/utils"
) )
@ -110,6 +111,10 @@ func (t *Tester) setSkipRegexFlag() error {
skipRegex += "|should.verify.that.all.nodes.have.volume.limits" skipRegex += "|should.verify.that.all.nodes.have.volume.limits"
} }
if cluster.Spec.CloudConfig != nil && cluster.Spec.CloudConfig.AWSEBSCSIDriver != nil && fi.BoolValue(cluster.Spec.CloudConfig.AWSEBSCSIDriver.Enabled) {
skipRegex += "|In-tree.Volumes.\\[Driver:.aws\\]"
}
// Ensure it is valid regex // Ensure it is valid regex
if _, err := regexp.Compile(skipRegex); err != nil { if _, err := regexp.Compile(skipRegex); err != nil {
return err return err