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
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
ef363fd88e
Коммит
316b155a42
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user