mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9f0b3f5609
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
32 lines
779 B
Go
32 lines
779 B
Go
package daemon
|
|
|
|
import (
|
|
"fmt"
|
|
"strconv"
|
|
"testing"
|
|
|
|
"golang.org/x/sys/windows"
|
|
"gotest.tools/v3/assert"
|
|
)
|
|
|
|
// SignalDaemonDump sends a signal to the daemon to write a dump file
|
|
func SignalDaemonDump(pid int) {
|
|
ev, _ := windows.UTF16PtrFromString("Global\\docker-daemon-" + strconv.Itoa(pid))
|
|
h2, err := windows.OpenEvent(0x0002, false, ev)
|
|
if h2 == 0 || err != nil {
|
|
return
|
|
}
|
|
windows.PulseEvent(h2)
|
|
}
|
|
|
|
func signalDaemonReload(pid int) error {
|
|
return fmt.Errorf("daemon reload not supported")
|
|
}
|
|
|
|
func cleanupNetworkNamespace(_ testing.TB, _ *Daemon) {}
|
|
|
|
// CgroupNamespace returns the cgroup namespace the daemon is running in
|
|
func (d *Daemon) CgroupNamespace(t testing.TB) string {
|
|
assert.Assert(t, false)
|
|
return "cgroup namespaces are not supported on Windows"
|
|
}
|