Skip to content

Commit b97ed03

Browse files
authored
Check if conv is nil before logging in tests (keybase#26107)
1 parent bddbcaa commit b97ed03

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎go/chat/server_test.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,11 @@ func TestChatSrvGetInboxNonblockLocalMetadata(t *testing.T) {
10361036
return ibox.InboxRes.Items[i].Time.After(ibox.InboxRes.Items[j].Time)
10371037
})
10381038
for index, conv := range ibox.InboxRes.Items {
1039-
t.Logf("metadata snippet: index: %d snippet: %s time: %v", index, conv.LocalMetadata.Snippet,
1039+
snippet := "<nil>"
1040+
if conv.LocalMetadata != nil {
1041+
snippet = conv.LocalMetadata.Snippet
1042+
}
1043+
t.Logf("metadata snippet: index: %d snippet: %s time: %v", index, snippet,
10401044
conv.Time)
10411045
}
10421046
index := 0

0 commit comments

Comments
 (0)