Skip to content

Commit

Permalink
test: remove deprecated helpers in unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Gupta Akirala <[email protected]>
  • Loading branch information
takirala committed Aug 5, 2023
1 parent e3ca8b1 commit 81c48ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/controller/sync/dispatch/retain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

"sigs.k8s.io/kubefed/pkg/controller/util"
)
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestRetainHealthCheckNodePortInServiceFields(t *testing.T) {
},
},
true,
pointer.Int64(1000),
ptr.To[int64](1000),
},
}
for _, test := range tests {
Expand Down Expand Up @@ -223,7 +223,7 @@ func TestRetainClusterIPsInServiceFields(t *testing.T) {
},
},
true,
pointer.String("1.2.3.4"),
ptr.To("1.2.3.4"),
nil,
},
{
Expand Down Expand Up @@ -256,7 +256,7 @@ func TestRetainClusterIPsInServiceFields(t *testing.T) {
},
},
true,
pointer.String("1.2.3.4"),
ptr.To("1.2.3.4"),
[]string{"5.6.7.8", "9.10.11.12"},
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/util/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestHandlers(t *testing.T) {
triggerChan <- obj
})

trigger.OnAdd(&service)
trigger.OnAdd(&service, false)
assert.True(t, triggered())
trigger.OnDelete(&service)
assert.True(t, triggeredWith(&service))
Expand Down

0 comments on commit 81c48ca

Please sign in to comment.