mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-12 06:49:45 +00:00
ci: address shadowing of predeclared identifier
- Comparing integers makes more sense than comparing the strings. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
parent
d46029ca1f
commit
dfc9bdaf03
13
e2e/utils.go
13
e2e/utils.go
@ -1580,10 +1580,17 @@ func k8sVersionGreaterEquals(c kubernetes.Interface, major, minor int) bool {
|
|||||||
// return value.
|
// return value.
|
||||||
}
|
}
|
||||||
|
|
||||||
maj := strconv.Itoa(major)
|
vMajor, err := strconv.Atoi(v.Major)
|
||||||
min := strconv.Itoa(minor)
|
if err != nil {
|
||||||
|
framework.Failf("failed to convert Kubernetes major version %q to int: %v", v.Major, err)
|
||||||
|
}
|
||||||
|
|
||||||
return (v.Major > maj) || (v.Major == maj && v.Minor >= min)
|
vMinor, err := strconv.Atoi(v.Minor)
|
||||||
|
if err != nil {
|
||||||
|
framework.Failf("failed to convert Kubernetes minor version %q to int: %v", v.Minor, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (vMajor > major) || (vMajor == major && vMinor >= minor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// waitForJobCompletion polls the status of the given job and waits until the
|
// waitForJobCompletion polls the status of the given job and waits until the
|
||||||
|
Loading…
Reference in New Issue
Block a user