e2e tests for blink
This commit is contained in:
1 parent
0eb1e66838
commit
b41b73fb49
7 files changed
+44
-8
No files matched your search
@@ -7,5 +7,6 @@ ROOM_TELEMOST=""
|
|||||||
ROOM_WBSTREAM=""
|
ROOM_WBSTREAM=""
|
||||||
ROOM_DION=""
|
ROOM_DION=""
|
||||||
ROOM_BITRIX=""
|
ROOM_BITRIX=""
|
||||||
|
ROOM_BLINK=""
|
||||||
|
|
||||||
ALLOW_NEW_ROOMS=0
|
ALLOW_NEW_ROOMS=0
|
||||||
@@ -12,8 +12,9 @@ No external network is used.
|
|||||||
|
|
||||||
## Platforms and scenarios
|
## Platforms and scenarios
|
||||||
|
|
||||||
Platforms: telemost, wbstream, dion, bitrix, vk. A platform skips the scenarios it
|
Platforms: telemost, wbstream, dion, bitrix, blink, vk. A platform skips the scenarios it
|
||||||
does not support: dion supports only connect and kick, vk only connect and dc.
|
does not support: dion supports only connect and kick, vk only connect and dc, blink
|
||||||
|
everything except kick.
|
||||||
|
|
||||||
`vk` runs only when named, needs `relay/relay` from `./build-go.sh`, and opens the VK
|
`vk` runs only when named, needs `relay/relay` from `./build-go.sh`, and opens the VK
|
||||||
captcha in your browser.
|
captcha in your browser.
|
||||||
@@ -40,6 +41,18 @@ Each platform reads `cookies-<platform>.json` from the repository root. Export
|
|||||||
these from the desktop creator app. If a cookie file is missing, the harness skips
|
these from the desktop creator app. If a cookie file is missing, the harness skips
|
||||||
that platform.
|
that platform.
|
||||||
|
|
||||||
|
## Blink
|
||||||
|
|
||||||
|
Blink has no guest access, so the creator and the joiner each need their own login.
|
||||||
|
Both can be the same account, but every login must be a separate QR scan. Create the
|
||||||
|
two files from the repository root, scanning each QR with the Blink app:
|
||||||
|
|
||||||
|
./headless/blink/headless-blink-creator --login --cookies cookies-blink.json
|
||||||
|
./headless/blink/headless-blink-creator --login --cookies cookies-blink-joiner.json
|
||||||
|
|
||||||
|
`ROOM_BLINK` is a chat id. The creator joins the call in that chat, and starts one if
|
||||||
|
the chat has no active call. The joiner's account must be a member of the chat.
|
||||||
|
|
||||||
## Run in Docker
|
## Run in Docker
|
||||||
|
|
||||||
The creator and joiner run in separate network namespaces so their WebRTC ICE does
|
The creator and joiner run in separate network namespaces so their WebRTC ICE does
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ cookies_path() {
|
|||||||
wbstream) _f="cookies-wbstream.json" ;;
|
wbstream) _f="cookies-wbstream.json" ;;
|
||||||
dion) _f="cookies-dion.json" ;;
|
dion) _f="cookies-dion.json" ;;
|
||||||
bitrix) _f="cookies-bitrix.json" ;;
|
bitrix) _f="cookies-bitrix.json" ;;
|
||||||
|
blink) _f="cookies-blink.json" ;;
|
||||||
|
blink_joiner) _f="cookies-blink-joiner.json" ;;
|
||||||
*) _f="cookies-$_p.json" ;;
|
*) _f="cookies-$_p.json" ;;
|
||||||
esac
|
esac
|
||||||
_envname=$(printf 'COOKIES_%s' "$(echo "$_p" | tr 'a-z' 'A-Z')")
|
_envname=$(printf 'COOKIES_%s' "$(echo "$_p" | tr 'a-z' 'A-Z')")
|
||||||
@@ -28,6 +30,7 @@ room_value() {
|
|||||||
pf_select() {
|
pf_select() {
|
||||||
PF_NAME="$1"
|
PF_NAME="$1"
|
||||||
PF_JOINER_MODE=""
|
PF_JOINER_MODE=""
|
||||||
|
PF_JOINER_COOKIES=""
|
||||||
case "$1" in
|
case "$1" in
|
||||||
vk)
|
vk)
|
||||||
PF_CREATOR="$HEADLESS/vk/headless-vk-creator"
|
PF_CREATOR="$HEADLESS/vk/headless-vk-creator"
|
||||||
@@ -69,6 +72,15 @@ pf_select() {
|
|||||||
PF_READY_RE="pub PC state: connected"
|
PF_READY_RE="pub PC state: connected"
|
||||||
PF_CAPS="connect dc kcp dual kick"
|
PF_CAPS="connect dc kcp dual kick"
|
||||||
;;
|
;;
|
||||||
|
blink)
|
||||||
|
PF_CREATOR="$HEADLESS/blink/headless-blink-creator"
|
||||||
|
PF_JOINER="$HEADLESS/blink-joiner/headless-blink-joiner"
|
||||||
|
PF_JOINER_COOKIES=$(cookies_path blink_joiner)
|
||||||
|
PF_LINK_FLAG="--room"
|
||||||
|
PF_CREATOR_ROOM_FLAG="--room"
|
||||||
|
PF_READY_RE="pub PC state: connected"
|
||||||
|
PF_CAPS="connect dc kcp dual"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown platform: $1"
|
die "unknown platform: $1"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ CONNECT_TIMEOUT="${CONNECT_TIMEOUT:-45}"
|
|||||||
PROBE_TIMEOUT="${PROBE_TIMEOUT:-20}"
|
PROBE_TIMEOUT="${PROBE_TIMEOUT:-20}"
|
||||||
KICK_TIMEOUT="${KICK_TIMEOUT:-30}"
|
KICK_TIMEOUT="${KICK_TIMEOUT:-30}"
|
||||||
|
|
||||||
ALL_PLATFORMS="telemost wbstream dion bitrix"
|
ALL_PLATFORMS="telemost wbstream dion bitrix blink"
|
||||||
ALL_SCENARIOS="connect dc kcp dual kick"
|
ALL_SCENARIOS="connect dc kcp dual kick"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -41,7 +41,7 @@ for _arg in "$@"; do
|
|||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
vk | telemost | wbstream | dion | bitrix)
|
vk | telemost | wbstream | dion | bitrix | blink)
|
||||||
RUN_PLATFORMS="$RUN_PLATFORMS $_arg"
|
RUN_PLATFORMS="$RUN_PLATFORMS $_arg"
|
||||||
;;
|
;;
|
||||||
connect | dc | kcp | dual | kick)
|
connect | dc | kcp | dual | kick)
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ run_platform() {
|
|||||||
record SKIP "$1 (cookies missing)"
|
record SKIP "$1 (cookies missing)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$PF_JOINER_COOKIES" ] && [ ! -f "$PF_JOINER_COOKIES" ]; then
|
||||||
|
log "=== $1 SKIP (joiner cookies not found at $PF_JOINER_COOKIES) ==="
|
||||||
|
record SKIP "$1 (joiner cookies missing)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
if [ -z "$PF_ROOM" ] && [ "${ALLOW_NEW_ROOMS:-0}" != "1" ]; then
|
if [ -z "$PF_ROOM" ] && [ "${ALLOW_NEW_ROOMS:-0}" != "1" ]; then
|
||||||
log "=== $1 SKIP (no ROOM_$(echo "$1" | tr 'a-z' 'A-Z') set; refusing to create a new room. Set it in .env or pass ALLOW_NEW_ROOMS=1) ==="
|
log "=== $1 SKIP (no ROOM_$(echo "$1" | tr 'a-z' 'A-Z') set; refusing to create a new room. Set it in .env or pass ALLOW_NEW_ROOMS=1) ==="
|
||||||
record SKIP "$1 (no room)"
|
record SKIP "$1 (no room)"
|
||||||
@@ -108,6 +113,9 @@ start_joiner() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
_flags=$(pf_variant_flags "$_variant")
|
_flags=$(pf_variant_flags "$_variant")
|
||||||
|
if [ -n "$PF_JOINER_COOKIES" ]; then
|
||||||
|
_flags="$_flags --cookies $PF_JOINER_COOKIES"
|
||||||
|
fi
|
||||||
$JOINER_WRAP "$PF_JOINER" "$PF_LINK_FLAG" "$JOIN_LINK" --socks-host "$JOINER_SOCKS_HOST" --socks-port "$JOINER_PORT" $_flags >"$JOINER_LOG" 2>&1 &
|
$JOINER_WRAP "$PF_JOINER" "$PF_LINK_FLAG" "$JOIN_LINK" --socks-host "$JOINER_SOCKS_HOST" --socks-port "$JOINER_PORT" $_flags >"$JOINER_LOG" 2>&1 &
|
||||||
JOINER_PID=$!
|
JOINER_PID=$!
|
||||||
track_pid "$JOINER_PID"
|
track_pid "$JOINER_PID"
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ CONNECT_TIMEOUT="${CONNECT_TIMEOUT:-45}"
|
|||||||
PROBE_TIMEOUT="${PROBE_TIMEOUT:-25}"
|
PROBE_TIMEOUT="${PROBE_TIMEOUT:-25}"
|
||||||
KICK_TIMEOUT="${KICK_TIMEOUT:-30}"
|
KICK_TIMEOUT="${KICK_TIMEOUT:-30}"
|
||||||
|
|
||||||
ALL_PLATFORMS="telemost wbstream dion bitrix"
|
ALL_PLATFORMS="telemost wbstream dion bitrix blink"
|
||||||
ALL_SCENARIOS="connect dc kcp dual kick"
|
ALL_SCENARIOS="connect dc kcp dual kick"
|
||||||
|
|
||||||
RUN_PLATFORMS=""
|
RUN_PLATFORMS=""
|
||||||
RUN_SCENARIOS=""
|
RUN_SCENARIOS=""
|
||||||
for _arg in "$@"; do
|
for _arg in "$@"; do
|
||||||
case "$_arg" in
|
case "$_arg" in
|
||||||
vk | telemost | wbstream | dion | bitrix) RUN_PLATFORMS="$RUN_PLATFORMS $_arg" ;;
|
vk | telemost | wbstream | dion | bitrix | blink) RUN_PLATFORMS="$RUN_PLATFORMS $_arg" ;;
|
||||||
connect | dc | kcp | dual | kick) RUN_SCENARIOS="$RUN_SCENARIOS $_arg" ;;
|
connect | dc | kcp | dual | kick) RUN_SCENARIOS="$RUN_SCENARIOS $_arg" ;;
|
||||||
*)
|
*)
|
||||||
log "unknown argument: $_arg"
|
log "unknown argument: $_arg"
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ telemost/headless-telemost-creator \
|
|||||||
wbstream/headless-wbstream-creator \
|
wbstream/headless-wbstream-creator \
|
||||||
dion/headless-dion-creator \
|
dion/headless-dion-creator \
|
||||||
bitrix/headless-bitrix-creator \
|
bitrix/headless-bitrix-creator \
|
||||||
|
blink/headless-blink-creator \
|
||||||
telemost-joiner/headless-telemost-joiner \
|
telemost-joiner/headless-telemost-joiner \
|
||||||
wbstream-joiner/headless-wbstream-joiner \
|
wbstream-joiner/headless-wbstream-joiner \
|
||||||
dion-joiner/headless-dion-joiner \
|
dion-joiner/headless-dion-joiner \
|
||||||
bitrix-joiner/headless-bitrix-joiner"
|
bitrix-joiner/headless-bitrix-joiner \
|
||||||
|
blink-joiner/headless-blink-joiner"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat >&2 <<EOF
|
cat >&2 <<EOF
|
||||||
@@ -83,7 +85,7 @@ case "${1:-}" in
|
|||||||
run)
|
run)
|
||||||
shift
|
shift
|
||||||
cookie_mounts=""
|
cookie_mounts=""
|
||||||
for c in vk yandex wbstream dion bitrix; do
|
for c in vk yandex wbstream dion bitrix blink blink-joiner; do
|
||||||
f="$REPO/cookies-$c.json"
|
f="$REPO/cookies-$c.json"
|
||||||
[ -f "$f" ] && cookie_mounts="$cookie_mounts -v $f:/cookies/cookies-$c.json"
|
[ -f "$f" ] && cookie_mounts="$cookie_mounts -v $f:/cookies/cookies-$c.json"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in new issue
Block a user