Merge pull request #15632 from serathius/fix-comparing-etcd-version
tests: Fix comparing etcd versionstorage-doc
commit
138fae6246
|
@ -364,7 +364,15 @@ func GetVersionFromBinary(binaryPath string) (*semver.Version, error) {
|
|||
for _, line := range lines {
|
||||
if strings.HasPrefix(line, "etcd Version:") {
|
||||
versionString := strings.TrimSpace(strings.SplitAfter(line, ":")[1])
|
||||
return semver.NewVersion(versionString)
|
||||
version, err := semver.NewVersion(versionString)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &semver.Version{
|
||||
Major: version.Major,
|
||||
Minor: version.Minor,
|
||||
Patch: version.Patch,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ func TestRobustness(t *testing.T) {
|
|||
e2e.WithPeerProxy(true),
|
||||
e2e.WithIsPeerTLS(true),
|
||||
}
|
||||
if !v.LessThan(version.V3_6) {
|
||||
if v.Compare(version.V3_6) >= 0 {
|
||||
snapshotOptions = append(snapshotOptions, e2e.WithSnapshotCatchUpEntries(100))
|
||||
}
|
||||
scenarios = append(scenarios, scenario{
|
||||
|
|
Loading…
Reference in New Issue