diff options
author | Timoney, Daniel (dt5972) <dtimoney@att.com> | 2017-02-15 10:37:53 -0500 |
---|---|---|
committer | Timoney, Daniel (dt5972) <dtimoney@att.com> | 2017-02-15 10:40:37 -0500 |
commit | 324ee36fe31763e507b422ab0a88e4230045e205 (patch) | |
tree | d0b04520f6657601c918ce63fd27575977624187 /dgbuilder/test/red/nodes/resources | |
parent | f0c97e8db427481e28c0a16b789bc73801b35e47 (diff) |
Initial commit for OpenECOMP SDN-C OA&M
Change-Id: I7ab579fd0d206bf356f36d52dcdf4f71f1fa2680
Signed-off-by: Timoney, Daniel (dt5972) <dtimoney@att.com>
Former-commit-id: 2a9f0edd09581f907e62ec4689b5ac94dd5382ba
Diffstat (limited to 'dgbuilder/test/red/nodes/resources')
17 files changed, 86 insertions, 0 deletions
diff --git a/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html new file mode 100644 index 00000000..b637ede2 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.html @@ -0,0 +1,3 @@ +<script type="text/x-red" data-template-name="test-node-1"></script> +<script type="text/x-red" data-help-name="test-node-1"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script> diff --git a/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js new file mode 100644 index 00000000..e8121416 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/DuplicateTestNode/TestNode1.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function DuplicateTestNode(n) {} + RED.nodes.registerType("test-node-1",DuplicateTestNode); +} diff --git a/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html new file mode 100644 index 00000000..5359644e --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.html @@ -0,0 +1,6 @@ +<script type="text/x-red" data-template-name="test-node-multiple-1a"></script> +<script type="text/x-red" data-help-name="test-node-multiple-1a"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1a',{});</script> +<script type="text/x-red" data-template-name="test-node-multiple-1b"></script> +<script type="text/x-red" data-help-name="test-node-multiple-1b"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-multiple-1b',{});</script> diff --git a/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js new file mode 100644 index 00000000..55747c0b --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/MultipleNodes1/MultipleNodes1.js @@ -0,0 +1,7 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode1(n) {} + RED.nodes.registerType("test-node-multiple-1a",TestNode1); + function TestNode2(n) {} + RED.nodes.registerType("test-node-multiple-1b",TestNode2); +} diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html new file mode 100644 index 00000000..abc823e8 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.html @@ -0,0 +1,4 @@ +<script type="text/x-red" data-template-name="nested-node-1"></script> +<script type="text/x-red" data-help-name="nested-node-1"></script> +<script type="text/javascript">RED.nodes.registerType('nested-node-1',{});</script> +<style></style> diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js new file mode 100644 index 00000000..cd3148a5 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/NestedNode.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("nested-node-1",TestNode); +} diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt new file mode 100644 index 00000000..59a29af1 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/icons/file.txt @@ -0,0 +1,3 @@ +This file exists just to ensure the 'icons' directory is in the repository. +TODO: a future test needs to ensure the right icon files are loaded - this + directory can be used for that diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html new file mode 100644 index 00000000..ac9235d2 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html @@ -0,0 +1,4 @@ +<script type="text/x-red" data-template-name="should-not-load-1"></script> +<script type="text/x-red" data-help-name="should-not-load-1"></script> +<script type="text/javascript">RED.nodes.registerType('should-not-load-1',{});</script> +<style></style> diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js new file mode 100644 index 00000000..8af249b1 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("should-not-load-1",TestNode); +} diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html new file mode 100644 index 00000000..4212fd58 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html @@ -0,0 +1,4 @@ +<script type="text/x-red" data-template-name="should-not-load-3"></script> +<script type="text/x-red" data-help-name="should-not-load-3"></script> +<script type="text/javascript">RED.nodes.registerType('should-not-load-3',{});</script> +<style></style> diff --git a/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js new file mode 100644 index 00000000..5856adad --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("should-not-load-3",TestNode); +} diff --git a/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html new file mode 100644 index 00000000..97dbf171 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.html @@ -0,0 +1,5 @@ +<script type="text/x-red" data-template-name="test-node-1"></script> +<script type="text/x-red" data-help-name="test-node-1"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-1',{});</script> +<style></style> +<p>this should be filtered out</p> diff --git a/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js new file mode 100644 index 00000000..bfa3b65b --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode1/TestNode1.js @@ -0,0 +1,5 @@ +// A test node that exports a function +module.exports = function(RED) { + function TestNode(n) {} + RED.nodes.registerType("test-node-1",TestNode); +} diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html new file mode 100644 index 00000000..66b65909 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.html @@ -0,0 +1,4 @@ +<script type="text/x-red" data-template-name="test-node-2"></script> +<script type="text/x-red" data-help-name="test-node-2"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-2',{});</script> +<style></style> diff --git a/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js new file mode 100644 index 00000000..faf61a8f --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode2/TestNode2.js @@ -0,0 +1,10 @@ +// A test node that exports a function which returns a resolving promise + +var when = require("when"); +module.exports = function(RED) { + return when.promise(function(resolve,reject) { + function TestNode(n) {} + RED.nodes.registerType("test-node-2",TestNode); + resolve(); + }); +} diff --git a/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html new file mode 100644 index 00000000..9a0f6f7e --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.html @@ -0,0 +1,3 @@ +<script type="text/x-red" data-template-name="test-node-3"></script> +<script type="text/x-red" data-help-name="test-node-3"></script> +<script type="text/javascript">RED.nodes.registerType('test-node-3',{});</script> diff --git a/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js new file mode 100644 index 00000000..756dc139 --- /dev/null +++ b/dgbuilder/test/red/nodes/resources/TestNode3/TestNode3.js @@ -0,0 +1,8 @@ +// A test node that exports a function which returns a rejecting promise + +var when = require("when"); +module.exports = function(RED) { + return when.promise(function(resolve,reject) { + reject("fail"); + }); +} |