Skip to content

Commit

Permalink
type assertion for pods
Browse files Browse the repository at this point in the history
  • Loading branch information
kannon92 committed Jan 30, 2024
1 parent b697c83 commit 5e54fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/jobs/pod/pod_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2490,8 +2490,8 @@ func TestReconciler_ErrorFinalizingPod(t *testing.T) {
WithStatusSubresource(&wl).
WithInterceptorFuncs(interceptor.Funcs{
Update: func(ctx context.Context, client client.WithWatch, obj client.Object, opts ...client.UpdateOption) error {
gvk := obj.GetObjectKind().GroupVersionKind()
if gvk.GroupVersion().String() == "v1" && gvk.Kind == "Pod" {
_, isPod := obj.(*corev1.Pod)
if isPod {
defer func() { reqcount++ }()
if reqcount == 0 {
// return a connection refused error for the first update request.
Expand Down

0 comments on commit 5e54fb2

Please sign in to comment.