Ignore whitespace changes in seccheck test message.

PiperOrigin-RevId: 444998438
This commit is contained in:
Rahat Mahmood
2022-04-27 16:31:06 -07:00
committed by gVisor bot
parent 93185b4eec
commit 92d84efb10
@@ -283,8 +283,11 @@ func TestExample(t *testing.T) {
t.Fatalf("ExitNotifyParent: %v", err)
}
check := func() error {
if got := server.out.String(); !strings.Contains(got, "gvisor.sentry.ExitNotifyParentInfo => exit_status: 123") {
return fmt.Errorf("ExitNotifyParentInfo point didn't get to the server, out: %q", got)
gotRaw := server.out.String()
// Collapse whitespace.
got := strings.Join(strings.Fields(gotRaw), " ")
if !strings.Contains(got, "gvisor.sentry.ExitNotifyParentInfo => exit_status: 123") {
return fmt.Errorf("ExitNotifyParentInfo point didn't get to the server, out: %q, raw: %q", got, gotRaw)
}
return nil
}