Skip to content

Commit

Permalink
Fix flaky TestGetIngressInfo unit test (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Matyushentsev authored and Alexander Matyushentsev committed May 9, 2019
1 parent 891e032 commit 6355e91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controller/cache/info_test.go
@@ -1,6 +1,8 @@
package cache

import (
"sort"
"strings"
"testing"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -50,6 +52,9 @@ func TestGetIngressInfo(t *testing.T) {
node := &node{}
populateNodeInfo(testIngress, node)
assert.Equal(t, 0, len(node.info))
sort.Slice(node.networkingInfo.TargetRefs, func(i, j int) bool {
return strings.Compare(node.networkingInfo.TargetRefs[j].Name, node.networkingInfo.TargetRefs[i].Name) < 0
})
assert.Equal(t, &v1alpha1.ResourceNetworkingInfo{
Ingress: []v1.LoadBalancerIngress{{IP: "107.178.210.11"}},
TargetRefs: []v1alpha1.ResourceRef{{
Expand Down

0 comments on commit 6355e91

Please sign in to comment.