We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52be253 commit 410c40cCopy full SHA for 410c40c
testing/integration/container_cmd_test.go
@@ -92,6 +92,18 @@ func TestContainerCMD(t *testing.T) {
92
if err := cmd.Process.Kill(); err != nil {
93
t.Fatalf("could not kill Elastic-Agent process: %s", err)
94
}
95
+
96
+ // Kill does not wait for the process to finish, so we wait here
97
+ state, err := cmd.Process.Wait()
98
+ if err != nil {
99
+ t.Errorf("Elastic-Agent exited with error after kill signal: %s", err)
100
+ t.Errorf("Elastic-Agent exited with status %d", state.ExitCode())
101
+ out, err := cmd.CombinedOutput()
102
+ if err == nil {
103
+ t.Log(string(out))
104
+ }
105
106
107
return
108
109
t.Log(">> cleaning up: no process to kill")
0 commit comments