How to test extension scripts in isolation

Dan Morphis dan at milkcarton.com
Tue Mar 7 19:39:05 EST 2017


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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170307/3d306cab/attachment.html>


More information about the Users mailing list