@webos-tools/cli 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/bin/ares-generate.js +4 -0
- package/bin/ares-novacom.js +2 -5
- package/bin/ares-setup-device.js +38 -30
- package/bin/ares.js +3 -3
- package/files/conf/config.json +9 -0
- package/files/conf-base/profile/config-ose.json +8 -0
- package/files/conf-base/profile/config-tv.json +9 -0
- package/files/help/ares-setup-device.help +44 -3
- package/files/templates/ose-sdk-templates/bootplate-web/index.html +1 -1
- package/lib/base/error-handler.js +2 -2
- package/lib/base/novacom.js +4 -4
- package/lib/base/setup-device.js +25 -18
- package/lib/inspect.js +3 -3
- package/lib/log.js +3 -3
- package/lib/package.js +38 -20
- package/lib/shell.js +2 -2
- package/npm-shrinkwrap.json +240 -114
- package/package.json +5 -5
- package/spec/jsSpecs/ares-setup-device.spec.js +21 -2
|
@@ -84,6 +84,25 @@ describe(aresCmd + ' --add(-a)', function() {
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
+
describe(aresCmd + ' --add(-a)', function() {
|
|
88
|
+
it('Add DEVICE using default info', function(done) {
|
|
89
|
+
const newDevice = 'default';
|
|
90
|
+
const defaultUserName = options.profile === 'tv' ? 'prisoner' : 'root';
|
|
91
|
+
const defaultPort = options.profile === 'tv' ? '9922' : '22';
|
|
92
|
+
const defaultHost = '127.0.0.1';
|
|
93
|
+
exec(cmd + ` -a ${newDevice}`, function(error, stdout, stderr) {
|
|
94
|
+
if (stderr && stderr.length > 0) {
|
|
95
|
+
common.detectNodeMessage(stderr);
|
|
96
|
+
}
|
|
97
|
+
expect(stdout).toContain(newDevice);
|
|
98
|
+
expect(stdout).toContain(defaultHost);
|
|
99
|
+
expect(stdout).toContain(defaultUserName);
|
|
100
|
+
expect(stdout).toContain(defaultPort);
|
|
101
|
+
done();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
})
|
|
105
|
+
|
|
87
106
|
describe(aresCmd + ' --add(-a)', function() {
|
|
88
107
|
it('Add DEVICE as default property', function(done) {
|
|
89
108
|
const host = '192.168.0.5';
|
|
@@ -269,11 +288,11 @@ describe(aresCmd + ' negative TC', function() {
|
|
|
269
288
|
});
|
|
270
289
|
|
|
271
290
|
it('Add invalid DEVICE', function(done) {
|
|
272
|
-
const deivceName = "invalid
|
|
291
|
+
const deivceName = "$%invalid";
|
|
273
292
|
exec(cmd + ` -a ${deivceName}`, function(error, stdout, stderr) {
|
|
274
293
|
if (stderr && stderr.length > 0) {
|
|
275
294
|
common.detectNodeMessage(stderr);
|
|
276
|
-
expect(stderr).toContain("ares-setup-device ERR! [Tips]: Invalid device name. The device name should
|
|
295
|
+
expect(stderr).toContain("ares-setup-device ERR! [Tips]: Invalid device name. The device name should not start with");
|
|
277
296
|
}
|
|
278
297
|
done();
|
|
279
298
|
});
|