How to test extension scripts in isolation

Sergio Fernández sergio19932 at gmail.com
Wed Mar 8 10:03:14 EST 2017


Very interesting! Thank you a lot, Dan.

Sergio Fernández Rubio - https://www.linkedin.com/in/sergiofdz/
(+34) 687 016 994
sergio19932 at gmail.com

2017-03-08 1:39 GMT+01:00 Dan Morphis <dan at milkcarton.com>:

> I needed a way to iteratively run my extension scripts without waiting for
> a preset to kickoff a provision to kickoff an extension. This is what I
> came up with. Place this script in your genieacs/config/ext folder (same
> location as your extension scripts) and call it ext-runner.js
>
> const cpeConfig = require('./cpe-config')
>
> const serial = 'SR515AA046-5000137';
> const oui = '3c9066';
> const productClass = '963168_OT142C_B';
>
> console.log('Running script');
>
> cpeConfig.getPppoe([serial, oui, productClass], function (e) {
>     console.error(e);
> });
>
> Replace "cpe-config" with the file name of your extension script, and the
> ".getPppoe" with the exported name.
>
> To run, cd to your genieacs dir and run "node config/ext/ext-runner.js"
>
> I hope this helps someone!
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170308/dcfb54a6/attachment-0001.html>


More information about the Users mailing list