mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-08 06:58:42 +00:00
Fix OnionShare URL detection in e2e tests
This commit is contained in:
@@ -30,14 +30,14 @@ if [ "${VOXVERA_E2E_OFFLINE:-}" != "1" ]; then
|
|||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
# Start OnionShare
|
# Start OnionShare
|
||||||
onionshare-cli --website --public --persistent dist/demosite/.onionshare-session dist/demosite >"$LOG_DIR/onionshare.log" 2>&1 &
|
onionshare-cli --website --public --persistent dist/demosite >"$LOG_DIR/onionshare.log" 2>&1 &
|
||||||
OS_PID=$!
|
OS_PID=$!
|
||||||
|
|
||||||
# Wait for URL
|
# Wait for URL
|
||||||
URL=""
|
URL=""
|
||||||
i=0
|
i=0
|
||||||
while [ $i -lt 30 ]; do
|
while [ $i -lt 90 ]; do
|
||||||
if grep -Eo 'https?://[a-zA-Z0-9]{16,56}\.onion' "$LOG_DIR/onionshare.log" | head -n1 >"$LOG_DIR/url.txt"; then
|
if grep -Eo 'http[^ ]+\.onion' "$LOG_DIR/onionshare.log" | head -n1 >"$LOG_DIR/url.txt"; then
|
||||||
URL=$(cat "$LOG_DIR/url.txt")
|
URL=$(cat "$LOG_DIR/url.txt")
|
||||||
[ -n "$URL" ] && break
|
[ -n "$URL" ] && break
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user