mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
fix graph test sorting
This commit is contained in:
parent
d371be33f7
commit
7f5def4361
1 changed files with 2 additions and 2 deletions
|
|
@ -146,7 +146,7 @@ func TestDeleteEdges_locked(t *testing.T) {
|
|||
return expectNodes[i].ID() < expectNodes[j].ID()
|
||||
})
|
||||
startNodes := c.start.graph.Nodes()
|
||||
sort.Slice(expectNodes, func(i, j int) bool {
|
||||
sort.Slice(startNodes, func(i, j int) bool {
|
||||
return startNodes[i].ID() < startNodes[j].ID()
|
||||
})
|
||||
assert.Equal(t, expectNodes, startNodes)
|
||||
|
|
@ -161,7 +161,7 @@ func TestDeleteEdges_locked(t *testing.T) {
|
|||
return expectEdges[i].From().ID() < expectEdges[j].From().ID()
|
||||
})
|
||||
startEdges := c.start.graph.Edges()
|
||||
sort.Slice(expectEdges, func(i, j int) bool {
|
||||
sort.Slice(startEdges, func(i, j int) bool {
|
||||
if startEdges[i].From().ID() == startEdges[j].From().ID() {
|
||||
return startEdges[i].To().ID() < startEdges[j].To().ID()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue