Configure MQTT broker hostname based on execution context (#993)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thomasnordquist <7721625+thomasnordquist@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-24 08:23:42 +01:00
committed by GitHub
parent f946ae39d7
commit c0b2950ecb
8 changed files with 37 additions and 8 deletions

View File

@@ -15,7 +15,9 @@ process.on('unhandledRejection' as any, (error: Error | any) => {
const runningUiTestOnCi = os.platform() === 'darwin' ? [] : ['--runningUiTestOnCi']
async function doStuff() {
console.log('Waiting for MQTT Broker on port 1880 (no auth)')
const brokerHost = process.env.TESTS_MQTT_BROKER_HOST || '127.0.0.1'
const brokerPort = process.env.TESTS_MQTT_BROKER_PORT || '1883'
console.log(`Waiting for MQTT Broker at ${brokerHost}:${brokerPort} (no auth)`)
await mockMqtt()
console.log('Starting playwright/electron')
@@ -39,7 +41,7 @@ async function doStuff() {
await createFakeMousePointer(browser)
// Wait for Username input to be visible
await browser.locator('//label[contains(text(), "Username")]/..//input')
await connectTo('127.0.0.1', browser)
await connectTo(brokerHost, browser)
stopMqttUpdates()
await sleep(1000, true)
const heapDump = await getHeapDump(browser)