From 638c660227ba41749f1432cdef1d71413504a0b4 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 2 Sep 2014 00:57:18 +0200 Subject: [PATCH] test/integration: update TestWebsocketQuery Because 6517bbc392fdf051295e0ab98c2591a3f4ead776 introduced automatic status update message upon connection. Change-Id: I17383930d97b38d2a4abf7a646aa291bf84d7014 --- pkg/test/integration/camlistore_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/test/integration/camlistore_test.go b/pkg/test/integration/camlistore_test.go index 976adc83f..5b9370b17 100644 --- a/pkg/test/integration/camlistore_test.go +++ b/pkg/test/integration/camlistore_test.go @@ -90,6 +90,15 @@ func TestWebsocketQuery(t *testing.T) { errc <- err return } + if !strings.HasPrefix(string(inMsg), `{"tag":"_status"`) { + errc <- fmt.Errorf("unexpected message type=%d msg=%q, wanted status update", inType, inMsg) + return + } + inType, inMsg, err = wc.ReadMessage() + if err != nil { + errc <- err + return + } if strings.Contains(string(inMsg), pn.String()) { errc <- nil return