From ea1e3ebae993a3d89302940dc1649b627c420aa1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 23 Aug 2025 00:16:46 +0900 Subject: container/params: pass fd instead of file The file is very difficult to stub. Pass fd instead as it is the value that is actually useful. Signed-off-by: Ophestra --- container/dispatcher_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container/dispatcher_test.go') diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index 1152e167..012673aa 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -356,12 +356,12 @@ func (k *kstub) isatty(fd int) bool { return expect.ret.(bool) } -func (k *kstub) receive(key string, e any, v **os.File) (closeFunc func() error, err error) { +func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error, err error) { expect := k.expect("receive") return expect.ret.(func() error), expect.error( checkArg(k, "key", key, 0), checkArgReflect(k, "e", e, 1), - checkArg(k, "v", v, 2)) + checkArg(k, "fdp", fdp, 2)) } func (k *kstub) bindMount(source, target string, flags uintptr, eq bool) error { -- cgit v1.3.1