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

@@ -23,8 +23,10 @@ export interface MockSparkplugClient {
}
const sample = (function () {
const brokerHost = process.env.TESTS_MQTT_BROKER_HOST || '127.0.0.1'
const brokerPort = process.env.TESTS_MQTT_BROKER_PORT || '1883'
let config = {
serverUrl: 'tcp://127.0.0.1:1883',
serverUrl: `tcp://${brokerHost}:${brokerPort}`,
username: '',
password: '',
groupId: 'Sparkplug Devices',