Skip to content

Commit

Permalink
Add missing parent to invocation of ChildReconciler.OurChild (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamachanko committed May 9, 2022
1 parent af55ebc commit 18bf0bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions reconcilers/reconcilers.go
Expand Up @@ -1072,6 +1072,7 @@ func (r *ChildReconciler) ourChild(parent, obj client.Object) bool {
}
fn := reflect.ValueOf(r.OurChild)
out := fn.Call([]reflect.Value{
reflect.ValueOf(parent),
reflect.ValueOf(obj),
})
keep := true
Expand Down
2 changes: 1 addition & 1 deletion reconcilers/reconcilers_test.go
Expand Up @@ -930,7 +930,7 @@ func TestChildReconciler(t *testing.T) {
Metadata: map[string]interface{}{
"SubReconciler": func(t *testing.T, c reconcilers.Config) reconcilers.SubReconciler {
r := defaultChildReconciler(c)
r.OurChild = func(child *corev1.ConfigMap) bool {
r.OurChild = func(parent *resources.TestResource, child *corev1.ConfigMap) bool {
return false
}
return r
Expand Down

0 comments on commit 18bf0bb

Please sign in to comment.