mirror of https://github.com/kubernetes/kops.git
Merge pull request #15753 from johngmyers/reduce-skip
Trim e2e skip regexes for Cilium
This commit is contained in:
commit
eeaad0221d
|
@ -83,3 +83,20 @@ func GetInstanceGroups(kopsBinary, clusterName string, env []string) ([]*api.Ins
|
|||
}
|
||||
return igs, nil
|
||||
}
|
||||
|
||||
// GetVersion will retrieve the kOps version.
|
||||
func GetVersion(kopsBinary string) (string, error) {
|
||||
args := []string{
|
||||
kopsBinary, "version", "--short",
|
||||
}
|
||||
c := exec.Command(args[0], args[1:]...)
|
||||
var stdout bytes.Buffer
|
||||
c.SetStdout(&stdout)
|
||||
var stderr bytes.Buffer
|
||||
c.SetStderr(&stderr)
|
||||
if err := c.Run(); err != nil {
|
||||
klog.Warningf("failed to run %s; stderr=%s", strings.Join(args, " "), stderr.String())
|
||||
return "", fmt.Errorf("error querying version from %s: %w", strings.Join(args, " "), err)
|
||||
}
|
||||
return stdout.String(), nil
|
||||
}
|
||||
|
|
|
@ -34,6 +34,12 @@ func (t *Tester) setSkipRegexFlag() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
kopsVersion, err := t.getKopsVersion()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
isPre28 := kopsVersion < "1.28"
|
||||
|
||||
cluster, err := t.getKopsCluster()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -45,12 +51,14 @@ func (t *Tester) setSkipRegexFlag() error {
|
|||
|
||||
skipRegex := skipRegexBase
|
||||
|
||||
// All the loadbalancer tests in the suite fail on IPv6, however,
|
||||
// they were skipped because they were tagged as [Slow]
|
||||
// skip these tests temporary since they fail always on IPv6
|
||||
// TODO: aojea
|
||||
// https://github.com/kubernetes/kubernetes/issues/113964
|
||||
skipRegex += "|LoadBalancers.should.be.able.to.preserve.UDP.traffic"
|
||||
if isPre28 {
|
||||
// All the loadbalancer tests in the suite fail on IPv6, however,
|
||||
// they were skipped because they were tagged as [Slow]
|
||||
// skip these tests temporary since they fail always on IPv6
|
||||
// TODO: aojea
|
||||
// https://github.com/kubernetes/kubernetes/issues/113964
|
||||
skipRegex += "|LoadBalancers.should.be.able.to.preserve.UDP.traffic"
|
||||
}
|
||||
|
||||
networking := cluster.Spec.LegacyNetworking
|
||||
switch {
|
||||
|
@ -67,12 +75,15 @@ func (t *Tester) setSkipRegexFlag() error {
|
|||
skipRegex += "|same.hostPort.but.different.hostIP.and.protocol"
|
||||
// https://github.com/cilium/cilium/issues/9207
|
||||
skipRegex += "|serve.endpoints.on.same.port.and.different.protocols"
|
||||
// These may be fixed in Cilium 1.13 but skipping for now
|
||||
skipRegex += "|Service.with.multiple.ports.specified.in.multiple.EndpointSlices"
|
||||
skipRegex += "|should.create.a.Pod.with.SCTP.HostPort"
|
||||
// https://github.com/cilium/cilium/issues/18241
|
||||
skipRegex += "|Services.should.create.endpoints.for.unready.pods"
|
||||
skipRegex += "|Services.should.be.able.to.connect.to.terminating.and.unready.endpoints.if.PublishNotReadyAddresses.is.true"
|
||||
|
||||
if isPre28 {
|
||||
// These may be fixed in Cilium 1.13 but skipping for now
|
||||
skipRegex += "|Service.with.multiple.ports.specified.in.multiple.EndpointSlices"
|
||||
skipRegex += "|should.create.a.Pod.with.SCTP.HostPort"
|
||||
// https://github.com/cilium/cilium/issues/18241
|
||||
skipRegex += "|Services.should.create.endpoints.for.unready.pods"
|
||||
skipRegex += "|Services.should.be.able.to.connect.to.terminating.and.unready.endpoints.if.PublishNotReadyAddresses.is.true"
|
||||
}
|
||||
} else if networking.KubeRouter != nil {
|
||||
skipRegex += "|load-balancer|hairpin|affinity\\stimeout|service\\.kubernetes\\.io|CLOSE_WAIT"
|
||||
skipRegex += "|EndpointSlice.should.support.a.Service.with.multiple"
|
||||
|
|
|
@ -97,6 +97,10 @@ func hasFlag(args string, flag string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (t *Tester) getKopsVersion() (string, error) {
|
||||
return kops.GetVersion("kops")
|
||||
}
|
||||
|
||||
func (t *Tester) getKopsCluster() (*api.Cluster, error) {
|
||||
if t.kopsCluster != nil {
|
||||
return t.kopsCluster, nil
|
||||
|
|
Loading…
Reference in New Issue