Skip to content
8 changes: 4 additions & 4 deletions iot/http_example/system-test/cloudiot_http_example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ const registryName = `nodejs-test-registry-iot-${uuid.v4()}`;
const helper = `node ../manager/manager.js`;
const cmd = `node cloudiot_http_example.js --registryId="${registryName}" --deviceId="${deviceId}" `;
const cwd = path.join(__dirname, `..`);
const installDeps = `pushd ../manager && npm install`;
const installDeps = `npm install`;
const linkDeps = `npm link`;

test.todo(tools.run(installDeps, `${cwd}/../manager`));
test.todo(tools.run(linkDeps, `${cwd}/../manager`));
test.before(tools.checkCredentials);
test.before(async () => {
const pubsub = PubSub();
Expand All @@ -53,7 +56,6 @@ test(`should receive configuration message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;

await tools.runAsync(installDeps, cwd);
await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand All @@ -75,7 +77,6 @@ test(`should send event message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;

await tools.runAsync(installDeps, cwd);
await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand All @@ -96,7 +97,6 @@ test(`should send event message`, async (t) => {
test(`should send event message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;
await tools.runAsync(installDeps, cwd);
await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand Down
8 changes: 4 additions & 4 deletions iot/mqtt_example/system-test/cloudiot_mqtt_example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ const helper = `node ../manager/manager.js`;
const cmd = `node cloudiot_mqtt_example_nodejs.js `;
const cmdSuffix = ` --numMessages=1 --privateKeyFile=resources/rsa_private.pem --algorithm=RS256`;
const cwd = path.join(__dirname, `..`);
const installDeps = `pushd ../manager && npm install`;
const installDeps = `npm install`;
const linkDeps = `npm link`;

test.todo(tools.run(installDeps, `${cwd}/../manager`));
test.todo(tools.run(linkDeps, `${cwd}/../manager`));
test.before(tools.checkCredentials);
test.before(async () => {
const pubsub = PubSub();
Expand All @@ -53,7 +56,6 @@ test(`should receive configuration message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;

await tools.runAsync(installDeps, cwd);
let output = await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand All @@ -78,7 +80,6 @@ test(`should send event message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;

await tools.runAsync(installDeps, cwd);
await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand All @@ -101,7 +102,6 @@ test(`should send event message`, async (t) => {
test(`should send state message`, async (t) => {
const localDevice = `test-rsa-device`;
const localRegName = `${registryName}-rsa256`;
await tools.runAsync(installDeps, cwd);
await tools.runAsync(`${helper} setupIotTopic ${topicName}`, cwd);
await tools.runAsync(
`${helper} createRegistry ${localRegName} ${topicName}`, cwd);
Expand Down