MM-18827 - Can not use api/v4/websocket with trailing slash (#12931)

Этот коммит содержится в:
Ali Farooq
2019-10-29 06:44:32 -04:00
коммит произвёл Saturnino Abril
родитель 7a665aacdd
Коммит 4cc2973483
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@@ -66,6 +66,15 @@ func TestWebSocket(t *testing.T) {
require.Equal(t, resp.Error.DetailedError, "", "detailed error not cleared")
}
func TestWebSocketTrailingSlash(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
url := fmt.Sprintf("ws://localhost:%v", th.App.Srv.ListenAddr.Port)
_, _, err := websocket.DefaultDialer.Dial(url+model.API_URL_SUFFIX+"/websocket/", nil)
require.NoError(t, err)
}
func TestWebSocketEvent(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()