Skip to content

Commit

Permalink
test with production instance
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik-rishi committed Oct 4, 2023
1 parent 264cf57 commit dd951fb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion test/integration-tests/mqtt-publish/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { client } = require('./nodejs-client');

const BROKER_URL = 'mqtt://localhost:1883';
// const BROKER_URL = 'mqtt://localhost:1883';
const BROKER_URL = 'mqtt://test.mosquitto.org';
const TURN_ON_TOPIC = 'smartylighting/streetlights/1/0/action/101/turn/on';

let enteredMiddleware = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default:

broker:
mqtt:
url: mqtt://localhost:1883
url: mqtt://test.mosquitto.org:1883
topics: ["smartylighting/streetlights/1/0/event/+/lighting/measured"]
qos:
protocol: mqtt
Expand Down
2 changes: 1 addition & 1 deletion test/integration-tests/mqtt-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"scripts": {
"setup": "npm run generate:client && npm install",
"generate:client": "$npm_package_config_root_dir/node_modules/.bin/ag --output \"./nodejs-client\" \"$npm_package_config_root_dir/test/mocks/mqtt/asyncapi.yml\" \"$npm_package_config_root_dir\" --force-write --param \"server=test\" && cd ./nodejs-client && npm install && cd ..",
"generate:client": "$npm_package_config_root_dir/node_modules/.bin/ag --output \"./nodejs-client\" \"$npm_package_config_root_dir/test/mocks/mqtt/asyncapi.yml\" \"$npm_package_config_root_dir\" --force-write --param \"server=production\" && cd ./nodejs-client && npm install && cd ..",
"test": "$npm_package_config_root_dir/node_modules/.bin/jest --forceExit ./integration-tests/$npm_package_config_example_name/index.spec.js"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion test/integration-tests/mqtt-subscribe/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const {client} = require("./nodejs-client")

const LIGHTING_MEASURED_TOPIC = 'smartylighting/streetlights/1/0/event/101/lighting/measured';
const BROKER_URL = "mqtt://localhost:1883";
// const BROKER_URL = "mqtt://localhost:1883";
const BROKER_URL = 'mqtt://test.mosquitto.org';
const MESSAGE_PUBLISHED = {lumens: 10};

let recievedMessage = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default:

broker:
mqtt:
url: mqtt://localhost:1883
url: mqtt://test.mosquitto.org:1883
topics: ["smartylighting/streetlights/1/0/event/+/lighting/measured"]
qos:
protocol: mqtt
Expand Down
2 changes: 1 addition & 1 deletion test/integration-tests/mqtt-subscribe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"scripts": {
"setup": "npm run generate:client && npm install",
"generate:client": "$npm_package_config_root_dir/node_modules/.bin/ag --output \"./nodejs-client\" \"$npm_package_config_root_dir/test/mocks/mqtt/asyncapi.yml\" \"$npm_package_config_root_dir\" --force-write --param \"server=test\" && cd ./nodejs-client && npm i && cd ..",
"generate:client": "$npm_package_config_root_dir/node_modules/.bin/ag --output \"./nodejs-client\" \"$npm_package_config_root_dir/test/mocks/mqtt/asyncapi.yml\" \"$npm_package_config_root_dir\" --force-write --param \"server=production\" && cd ./nodejs-client && npm i && cd ..",
"test": "$npm_package_config_root_dir/node_modules/.bin/jest --forceExit ./index.spec.js"
},
"dependencies": {
Expand Down

0 comments on commit dd951fb

Please sign in to comment.