Commit 230556f0 authored by enahum's avatar enahum Committed by Joram Wilander
Browse files

PLT-6046 remove webrtc from tests (#5872)

parent ea746134
......@@ -90,14 +90,6 @@ start-docker:
docker start mattermost-postgres > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-webrtc) -eq 0 ]; then \
echo starting mattermost-webrtc; \
docker run --name mattermost-webrtc -p 7088:7088 -p 7089:7089 -p 8188:8188 -p 8189:8189 -d mattermost/webrtc:latest > /dev/null; \
elif [ $(shell docker ps | grep -ci mattermost-webrtc) -eq 0 ]; then \
echo restarting mattermost-webrtc; \
docker start mattermost-webrtc > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 0 ]; then \
echo starting mattermost-inbucket; \
docker run --name mattermost-inbucket -p 9000:10080 -p 2500:10025 -d jhillyerd/inbucket:latest > /dev/null; \
......@@ -148,11 +140,6 @@ stop-docker:
docker stop mattermost-openldap > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-webrtc) -eq 1 ]; then \
echo stopping mattermost-webrtc; \
docker stop mattermost-webrtc > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
echo stopping mattermost-inbucket; \
docker stop mattermost-inbucket > /dev/null; \
......@@ -179,12 +166,6 @@ clean-docker:
docker rm -v mattermost-openldap > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-webrtc) -eq 1 ]; then \
echo removing mattermost-webrtc; \
docker stop mattermost-webrtc > /dev/null; \
docker rm -v mattermost-webrtc > /dev/null; \
fi
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
echo removing mattermost-inbucket; \
docker stop mattermost-inbucket > /dev/null; \
......
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package api
import (
"fmt"
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
"testing"
)
func TestWebrtcToken(t *testing.T) {
th := Setup().InitBasic()
*utils.Cfg.WebrtcSettings.Enable = false
if _, err := th.BasicClient.GetWebrtcToken(); err == nil {
t.Fatal("should have failed")
}
*utils.Cfg.WebrtcSettings.Enable = true
*utils.Cfg.WebrtcSettings.GatewayAdminUrl = "https://dockerhost:7089/admin"
*utils.Cfg.WebrtcSettings.GatewayWebsocketUrl = "wss://dockerhost:8189"
*utils.Cfg.WebrtcSettings.GatewayAdminSecret = "janusoverlord"
*utils.Cfg.WebrtcSettings.StunURI = "stun:dockerhost:5349"
*utils.Cfg.WebrtcSettings.TurnURI = "turn:dockerhost:5349"
*utils.Cfg.WebrtcSettings.TurnUsername = "test"
*utils.Cfg.WebrtcSettings.TurnSharedKey = "mattermost"
*utils.Cfg.ServiceSettings.EnableInsecureOutgoingConnections = true
sessionId := model.NewId()
if result, err := th.BasicClient.GetWebrtcToken(); err != nil {
t.Fatal(err)
} else {
fmt.Println("Token", result["token"])
fmt.Println("Gateway Websocket", result["gateway_url"])
fmt.Println("Stun URI", result["stun_uri"])
fmt.Println("Turn URI", result["turn_uri"])
fmt.Println("Turn Username", result["turn_username"])
fmt.Println("Turn Password", result["turn_password"])
}
app.RevokeWebrtcToken(sessionId)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment