aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-23 00:16:46 +0900
committerOphestra <cat@gensokyo.uk>2025-08-23 00:16:46 +0900
commitea1e3ebae993a3d89302940dc1649b627c420aa1 (patch)
tree14bc57e3b04cde10394174c407c836d4ed25b113 /container/dispatcher_test.go
parent1c692bfb7926c0f28cf7f38ca7b49f4941fd2b90 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher_test.go')
-rw-r--r--container/dispatcher_test.go4
1 files changed, 2 insertions, 2 deletions
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 {