core: add context parameter to opcontroller
This commit adds context parameter to utilities in opcontroller to remove context.TODO use in opcontroller. By this, we can handle cancellation of reconcilers in a fine-grained way. Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
This commit is contained in:
1 parent
1a6827bea5
commit
3fd86f83ae
26 files changed
+81
-79
No files matched your search
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
@@ -61,7 +62,7 @@ func TestObjectToCRMapper(t *testing.T) {
|
||||
{NamespacedName: client.ObjectKey{Name: "my-pool", Namespace: "rook-ceph"}},
|
||||
}
|
||||
|
||||
handlerFunc, err := ObjectToCRMapper(cl, objects[0], s)
|
||||
handlerFunc, err := ObjectToCRMapper(context.TODO(), cl, objects[0], s)
|
||||
assert.NoError(t, err)
|
||||
assert.ElementsMatch(t, fakeRequest, handlerFunc(fs))
|
||||
}
|
||||
Reference in new issue
Block a user