File: reap_stub_test.go

package info (click to toggle)
golang-github-hashicorp-go-reap 0.0~git20160113.0.2d85522-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 124 kB
  • ctags: 18
  • sloc: makefile: 2
file content (27 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// +build windows solaris

package reap

import (
	"runtime"
	"testing"
)

func TestReap_IsSupported(t *testing.T) {
	if IsSupported() {
		t.Fatalf("reap should not be supported on %s", runtime.GOOS)
	}
}

func TestReap_ReapChildren(t *testing.T) {
	pids := make(PidCh, 1)
	errors := make(ErrorCh, 1)
	ReapChildren(pids, errors, nil, nil)
	select {
	case <-pids:
		t.Fatalf("should not report any pids")
	case <-errors:
		t.Fatalf("should not report any errors")
	default:
	}
}