Skip to content
Snippets Groups Projects
Commit 03f81f8d authored by Nayeem Rahman's avatar Nayeem Rahman
Browse files

Set a custom room in tests

parent 7b5219e6
No related branches found
No related tags found
No related merge requests found
import puppeteer from "puppeteer" import puppeteer from "puppeteer"
const appHost = process.env.APP_HOST const appUrl = process.env.APP_URL
const peerIndex = parseInt(process.env.PEER_INDEX) const peerIndex = parseInt(process.env.PEER_INDEX)
const numPeers = parseInt(process.env.NUM_PEERS) const numPeers = parseInt(process.env.NUM_PEERS)
...@@ -11,7 +11,7 @@ const syncTimeout = numPeers * 4000 ...@@ -11,7 +11,7 @@ const syncTimeout = numPeers * 4000
try { try {
// Open the application. // Open the application.
const page = await browser.newPage() const page = await browser.newPage()
await page.goto(appHost) await page.goto(appUrl)
console.log(`Peer ${peerIndex}: Connected.`) console.log(`Peer ${peerIndex}: Connected.`)
// Set up observer. // Set up observer.
......
...@@ -4,7 +4,7 @@ CLIENT_USER=mnr17 ...@@ -4,7 +4,7 @@ CLIENT_USER=mnr17
cd $(dirname $0) cd $(dirname $0)
app_host="https://lets-draw.live" app_url="https://lets-draw.live?room=test-$(date +%s)"
client_hostnames=$(cat client-hostnames) client_hostnames=$(cat client-hostnames)
num_peers=$(echo $client_hostnames | wc -w) num_peers=$(echo $client_hostnames | wc -w)
...@@ -33,7 +33,7 @@ for hostname in $client_hostnames; do ...@@ -33,7 +33,7 @@ for hostname in $client_hostnames; do
ssh -oStrictHostKeyChecking=no $CLIENT_USER@$hostname " ssh -oStrictHostKeyChecking=no $CLIENT_USER@$hostname "
source ~/.nvm/nvm.sh && source ~/.nvm/nvm.sh &&
cd ~/client && cd ~/client &&
export APP_HOST=$app_host && export APP_URL=$app_url &&
export PEER_INDEX=$current_peer_index && export PEER_INDEX=$current_peer_index &&
export NUM_PEERS=$num_peers && export NUM_PEERS=$num_peers &&
export PUPPETEER_EXECUTABLE_PATH=\"/opt/google/chrome/chrome\" && export PUPPETEER_EXECUTABLE_PATH=\"/opt/google/chrome/chrome\" &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment