We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 469a746 commit 6d76d62Copy full SHA for 6d76d62
1 file changed
reexec/reexec_test.go
@@ -36,7 +36,10 @@ func init() {
36
time.Sleep(1 * time.Second)
37
os.Exit(0)
38
})
39
- Init()
+ if Init() {
40
+ // Make sure we exit in case re-exec didn't os.Exit on its own.
41
+ os.Exit(0)
42
+ }
43
}
44
45
func TestRegister(t *testing.T) {
@@ -199,7 +202,7 @@ func TestNaiveSelf(t *testing.T) {
199
202
os.Exit(2)
200
203
201
204
cmd := exec.Command(naiveSelf(), "-test.run=TestNaiveSelf")
- cmd.Env = append(os.Environ(), "TEST_CHECK=1")
205
+ cmd.Env = append(cmd.Environ(), "TEST_CHECK=1")
206
err := cmd.Start()
207
if err != nil {
208
t.Fatalf("Unable to start command: %v", err)
0 commit comments