MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / isExpectedMessage

Function isExpectedMessage

lib/gcppubsub/client_test.go:220–228  ·  view source on GitHub ↗

Helper to check handler details. Does not do assertions. Only logs for debugging purposes.

(t *testing.T, expectedData, actualData []byte, expectedID, actualID string)

Source from the content-addressed store, hash-verified

218
219// Helper to check handler details. Does not do assertions. Only logs for debugging purposes.
220func isExpectedMessage(t *testing.T, expectedData, actualData []byte, expectedID, actualID string) bool {
221 ret := string(expectedData) == string(actualData) && expectedID == actualID
222 if !ret {
223 t.Logf("expectedData: %s, actualData: %s, expectedID: %s, actualID: %s",
224 expectedData, actualData, expectedID, actualID)
225 }
226
227 return ret
228}
229
230func TestSubscribe_ErrorHandling(t *testing.T) {
231 ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected