mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Sort of pods in test case was incorrect
This commit is contained in:
parent
cba76ef1ef
commit
3f8d30881c
@ -42,7 +42,10 @@ func (s sortedPods) Swap(i, j int) {
|
|||||||
s[i], s[j] = s[j], s[i]
|
s[i], s[j] = s[j], s[i]
|
||||||
}
|
}
|
||||||
func (s sortedPods) Less(i, j int) bool {
|
func (s sortedPods) Less(i, j int) bool {
|
||||||
return s[i].ID < s[j].ID && s[i].Namespace < s[j].Namespace
|
if s[i].Namespace < s[j].Namespace {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return s[i].ID < s[j].ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateValidPod(name, namespace, source string) api.BoundPod {
|
func CreateValidPod(name, namespace, source string) api.BoundPod {
|
||||||
|
Loading…
Reference in New Issue
Block a user