blob: 813e9d6670d78189c5e88dfd86f37ba6096f2fba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package integrationtests
import (
"strings"
"testing"
)
func TestWorkloadCrashReportsError(t *testing.T) {
h := newTestHarness(t)
result, pid, err := h.Run("crash", 5)
if err == nil {
t.Fatal("expected error from crashed workload, got nil")
}
if pid == 0 {
t.Fatal("expected non-zero PID from started workload")
}
if !strings.Contains(err.Error(), "workload") {
t.Errorf("error should mention workload, got: %v", err)
}
if len(result.Records) != 0 {
t.Errorf("expected no records from crashed workload, got %d", len(result.Records))
}
}
|