mirror of
https://github.com/status-im/go-watchdog.git
synced 2025-02-19 12:47:20 +00:00
This commit introduces the cgroup-driven watchdog. It can be initialized by calling watchdog.CgroupDriven(). This watchdog infers the limit from the process' cgroup, which is either derived from /proc/self/cgroup, or from the root cgroup if the PID == 1 (running in a container). Tests have been added/refactored to accommodate running locally and in a Docker container. Certain test cases now must be isolated from one another, to prevent side-effects from dirty go runtimes. A Makefile has been introduced to run all tests.
16 lines
309 B
Go
16 lines
309 B
Go
// +build !linux
|
|
|
|
package watchdog
|
|
|
|
import "testing"
|
|
|
|
func TestCgroupsDriven_Create_Isolated(t *testing.T) {
|
|
// this test only runs on linux.
|
|
t.Skip("test only valid on linux")
|
|
}
|
|
|
|
func TestCgroupsDriven_Docker_Isolated(t *testing.T) {
|
|
// this test only runs on linux.
|
|
t.Skip("test only valid on linux")
|
|
}
|