diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-10-31 08:59:23 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-10-31 08:59:23 -0400 |
commit | 316b155a42a4d00fb835438ce7e0401a64e59add (patch) | |
tree | 6a64f05e948323ae7595971608d84a4420a08290 /api/status_test.go | |
parent | ef363fd88ebb731dbb0470ad7cb5f50de0f3845c (diff) | |
download | chat-316b155a42a4d00fb835438ce7e0401a64e59add.tar.gz chat-316b155a42a4d00fb835438ce7e0401a64e59add.tar.bz2 chat-316b155a42a4d00fb835438ce7e0401a64e59add.zip |
PLT-3562 Switch websocket over to post-connect authentication (#4327)
* Switch websocket over to post-connect authentication
* Add ability to specify token in websocket js driver, add unit tests
* Temporarily disable client websocket tests until issues are resolved
* Minor refactoring and fix status test
* Add isAuthenticated method to WebConn and minor status updates
Diffstat (limited to 'api/status_test.go')
-rw-r--r-- | api/status_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/api/status_test.go b/api/status_test.go index ffc946817..2aa866a47 100644 --- a/api/status_test.go +++ b/api/status_test.go @@ -22,6 +22,11 @@ func TestStatuses(t *testing.T) { defer WebSocketClient.Close() WebSocketClient.Listen() + time.Sleep(300 * time.Millisecond) + if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK { + t.Fatal("should have responded OK to authentication challenge") + } + team := model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN} rteam, _ := Client.CreateTeam(&team) @@ -75,7 +80,7 @@ func TestStatuses(t *testing.T) { } if status, ok := resp.Data[th.BasicUser2.Id]; !ok { - t.Log(len(resp.Data)) + t.Log(resp.Data) t.Fatal("should have had user status") } else if status != model.STATUS_ONLINE { t.Log(status) |