Making code involving syscalls testable in peertracker
#5755
Labels
help wanted
Issues with this label are ready to start work but are in need of someone to do it
priority/backlog
Issue is approved and in the backlog
peertracker
Relates to #5749
Some code which makes direct syscalls is hard to test, e.g.
compareObjectHandles
which behaves differently on different Windows systems.spire/pkg/common/peertracker/npipe_windows.go
Lines 67 to 76 in 802ea39
One way might be to change these sorts of funcs into methods on a type that allows swapping out
syscall.SyscallN
and other currently global variables for something that can be overridden at test time, so that surrounding logic can be tested (example in #5749 (comment))The text was updated successfully, but these errors were encountered: