diff --git a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js new file mode 100644 index 0000000000..64fa272f4f --- /dev/null +++ b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/index.js @@ -0,0 +1,24 @@ +class DummyPlugin { + onPluginInit() { + console.log("DummyPlugin#onPluginInit() OK"); + return Promise.resolve(); + } + getInstanceId() { + console.log("DummyPlugin#getInstanceId() OK"); + return "dummy_instance_id"; + } + getPackageName() { + console.log("DummyPlugin#getPackageName() OK"); + return "@hyperledger/cactus-dummy-package"; + } +} + +class DummyPluginFactory { + create() { + return Promise.resolve(new DummyPlugin()); + } +} + +module.exports.createPluginFactory = (options) => { + return Promise.resolve(new DummyPluginFactory(options)); +}; diff --git a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json new file mode 100644 index 0000000000..3e49001c07 --- /dev/null +++ b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json @@ -0,0 +1,6 @@ +{ + "name": "@hyperledger/cactus-dummy-package", + "version": "1.0.0-rc.2", + "description": "Dummy package for testing.", + "main": "index.js" + } \ No newline at end of file