Skip to content

Commit eee0406

Browse files
committed
Fix example_test.go to use new list options
The example was still using the old list options arguments style (second argument instead of last argument), which made it fail to compile. This also makes sure we run go test on the whole project, instead of just pkg/...
1 parent f0ec881 commit eee0406

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (a *ReplicaSetReconciler) Reconcile(req controllers.Request) (controllers.R
8181

8282
// List the Pods matching the PodTemplate Labels
8383
pods := &corev1.PodList{}
84-
err = a.List(context.TODO(), client.InNamespace(req.Namespace).MatchingLabels(rs.Spec.Template.Labels), pods)
84+
err = a.List(context.TODO(), pods, client.InNamespace(req.Namespace), client.MatchingLabels(rs.Spec.Template.Labels))
8585
if err != nil {
8686
return controllers.Result{}, err
8787
}

hack/test-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ setup_envs
2222

2323
header_text "running go test"
2424

25-
go test ./pkg/... -parallel 4
25+
go test ./... -parallel 4
2626

2727
header_text "running coverage"
2828

0 commit comments

Comments
 (0)