From 51593022b6d747391459f36d11d65ff101e5a85b Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Mon, 25 Mar 2024 01:43:25 +0000 Subject: [PATCH 01/28] Improved code --- tests/schemas/actions/action-chaining.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/schemas/actions/action-chaining.js b/tests/schemas/actions/action-chaining.js index 4e6d875..3617b14 100644 --- a/tests/schemas/actions/action-chaining.js +++ b/tests/schemas/actions/action-chaining.js @@ -1,4 +1,3 @@ - NEWACTION('Chaining/one', { name: 'Action number one', input: 'value:Object', @@ -7,8 +6,6 @@ NEWACTION('Chaining/one', { } }); - - NEWACTION('Chaining/two', { name: 'Action number two', input: 'value:Object', From bd76b49d761c9c5ff5f0af4927044cb1afa38685 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 3 Apr 2024 07:06:00 +0000 Subject: [PATCH 02/28] Added the missing merge css tests --- tests/bundles/app/controllers/default.js | 5 + tests/bundles/app/myapp.bundle | 3 + tests/bundles/bundles/myapp.bundle | 3 + tests/bundles/index.js | 59 +-- tests/common/cron.js | 88 ++++- tests/filestorage/config | 1 + tests/filestorage/controllers/default.js | 36 ++ tests/filestorage/controllers/download.js | 9 + .../databases/fs-files/0365/IgOGpa1dY60f.file | 21 ++ .../databases/fs-files/0676/IgOH6e1dQ60f.file | 21 ++ .../databases/fs-files/1213/IgOGPf1dn60f.file | 21 ++ .../databases/fs-files/1245/IgO9LF1dd60f.file | 21 ++ .../databases/fs-files/2473/IgO6Ql1c461f.file | 63 ++++ .../databases/fs-files/3505/IgOH6d1cQ61f.file | 21 ++ .../databases/fs-files/4228/IgOH6e1eQ61f.file | 21 ++ .../databases/fs-files/4816/IgO9HZ1cg61f.file | 63 ++++ .../databases/fs-files/5700/IgOGpZ1cY61f.file | 21 ++ .../databases/fs-files/6102/IgO5QN1cH61f.file | 63 ++++ .../databases/fs-files/6125/IgO9Dd1cX61f.file | 63 ++++ .../databases/fs-files/7723/IgOGPf1cn61f.file | 21 ++ .../databases/fs-files/7755/IgO9LF1cd61f.file | 63 ++++ .../databases/fs-files/8306/IgO9HZ1dg60f.file | 21 ++ .../databases/fs-files/8624/IgO6Vy1cU61f.file | 63 ++++ .../filestorage/databases/fs-files/files.log | 15 + tests/filestorage/index.js | 63 ++++ tests/filestorage/smallfile.txt | 21 ++ tests/filestorage/tmp/upload_1.bin | 0 tests/minificators/index.js | 107 +++++- .../public/script_multiline_string.js | 11 + .../public/script_multiple_var.js | 12 + tests/minificators/public/script_regex.js | 14 + tests/minificators/public/style2.css | 4 +- tests/minificators/public/style_color.css | 4 + tests/minificators/public/style_nested.css | 15 + .../public/style_value_compression.css | 15 + tests/nosql/index.js | 239 ++++++------ tests/proxy/index.js | 73 +++- tests/routing/controllers/sockets.js | 110 ++++++ tests/routing/definitions/middleware.js | 4 +- tests/routing/draft.js | 357 ------------------ tests/routing/schemas/apirouting.js | 52 +-- tests/routing/schemas/auth.js | 18 +- tests/routing/schemas/headers.js | 12 +- tests/routing/schemas/method.js | 10 +- tests/routing/schemas/middleware.js | 12 +- tests/routing/schemas/params.js | 44 +-- tests/routing/schemas/wildcards.js | 60 +-- tests/routing/tms.js | 39 -- tests/routing/tms.js.json | 43 --- tests/run.js | 1 + tests/schemas/index.js | 40 +- tests/schemas/schemas/schema-formatting.js | 4 +- tests/schemas/schemas/schema-notrequired.js | 2 +- tests/schemas/schemas/schema-required.js | 2 +- tests/staticfiles/definitions/merge.js | 6 +- tests/staticfiles/index.js | 27 +- tests/staticfiles/public/css/style.css | 5 + tests/staticfiles/public/css/style2.css | 5 + tests/staticfiles/public/css/style3.css | 5 + tests/tms.zip | Bin 0 -> 4671 bytes tests/tms/config | 2 + tests/tms/databases/config.json | 3 + tests/tms/definitions/tms.js | 6 + tests/tms/index.js | 30 ++ 64 files changed, 1533 insertions(+), 730 deletions(-) create mode 100644 tests/bundles/app/controllers/default.js create mode 100644 tests/bundles/app/myapp.bundle create mode 100644 tests/bundles/bundles/myapp.bundle create mode 100644 tests/filestorage/config create mode 100644 tests/filestorage/controllers/default.js create mode 100644 tests/filestorage/controllers/download.js create mode 100644 tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file create mode 100644 tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file create mode 100644 tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file create mode 100644 tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file create mode 100644 tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file create mode 100644 tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file create mode 100644 tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file create mode 100644 tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file create mode 100644 tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file create mode 100644 tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file create mode 100644 tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file create mode 100644 tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file create mode 100644 tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file create mode 100644 tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file create mode 100644 tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file create mode 100644 tests/filestorage/databases/fs-files/files.log create mode 100644 tests/filestorage/index.js create mode 100644 tests/filestorage/smallfile.txt create mode 100644 tests/filestorage/tmp/upload_1.bin create mode 100644 tests/minificators/public/script_multiline_string.js create mode 100644 tests/minificators/public/script_multiple_var.js create mode 100644 tests/minificators/public/script_regex.js create mode 100644 tests/minificators/public/style_color.css create mode 100644 tests/minificators/public/style_nested.css create mode 100644 tests/minificators/public/style_value_compression.css delete mode 100644 tests/routing/draft.js delete mode 100644 tests/routing/tms.js delete mode 100644 tests/routing/tms.js.json create mode 100644 tests/staticfiles/public/css/style.css create mode 100644 tests/staticfiles/public/css/style2.css create mode 100644 tests/staticfiles/public/css/style3.css create mode 100644 tests/tms.zip create mode 100644 tests/tms/config create mode 100644 tests/tms/databases/config.json create mode 100644 tests/tms/definitions/tms.js create mode 100644 tests/tms/index.js diff --git a/tests/bundles/app/controllers/default.js b/tests/bundles/app/controllers/default.js new file mode 100644 index 0000000..701b0e1 --- /dev/null +++ b/tests/bundles/app/controllers/default.js @@ -0,0 +1,5 @@ +exports.install = function() { + ROUTE('GET /', function($) { + $.plain('Hello World'); + }); +}; \ No newline at end of file diff --git a/tests/bundles/app/myapp.bundle b/tests/bundles/app/myapp.bundle new file mode 100644 index 0000000..39d11f0 --- /dev/null +++ b/tests/bundles/app/myapp.bundle @@ -0,0 +1,3 @@ +/controllers/ : # +/myapp.bundle : H4sIAAAAAAAAE9NPzs8rKcrPyUktKtZXoA2wUlDm0s+tTCwo0EsqzUvJSaWZPQDyHFnAzgAAAA== +/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/bundles/myapp.bundle b/tests/bundles/bundles/myapp.bundle new file mode 100644 index 0000000..39d11f0 --- /dev/null +++ b/tests/bundles/bundles/myapp.bundle @@ -0,0 +1,3 @@ +/controllers/ : # +/myapp.bundle : H4sIAAAAAAAAE9NPzs8rKcrPyUktKtZXoA2wUlDm0s+tTCwo0EsqzUvJSaWZPQDyHFnAzgAAAA== +/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 3f240d1..4bfb688 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -7,42 +7,51 @@ require('../../test'); // Removing files // load web server and test app -CONF.$imprint = false; -F.http(); +CONF.$imprint = true; var url = 'http://localhost:8000/'; -var filename = 'openreports.bundle'; +var filename = 'myapp.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; -ON('ready', function() { - Test.push('Bundles', function(next) { - // Test.print('String.slug()', [error]); - var arr = []; +Test.push('Bundles', function(next) { + var arr = []; + arr.push(function(resume) { - arr.push(function(resume) { - RESTBuilder.GET(url).exec(function(err, response) { - console.log(err, response); - Test.print('From local', err === null ? null : 'App is not successfully started '); - PATH.unlink(PATH.root('bundles/' + filename), function() { - F.restart(); - resume() - }); + RESTBuilder.GET(url).exec(function(err, response) { + console.log(err, response); + Test.print('From local', err === null ? null : 'App is not successfully started'); + Total.Path.unlink(PATH.root('bundles/' + filename), function() { + Test.print('From local', err === null ? null : 'App is not successfully started'); + F.restart(); + resume(); }); }); + }); - arr.push(function(resume) { - resume(); - }); + arr.push(function(resume) { + var file = `exports.install = function() { - arr.push(function(resume) { - resume(); - }); +ROUTE('GET /bundle/merge/', function($) { +$.plain('bundle is merged'); +});`; + var filename = Total.Path.controllers('--merge.js'); + console.log(filename); + Total.Fs.writeFile(filename, file, function(err) { + if (err) + throw err; - arr.async(function() { - next(); }); + resume(); + }); + + arr.push(function(resume) { + resume(); + }); + + arr.async(function() { + next(); }); +}); - setTimeout(() => Test.run(), 600); -}); \ No newline at end of file +setTimeout(() => Test.run(), 600); diff --git a/tests/common/cron.js b/tests/common/cron.js index 744cf46..e946ed6 100644 --- a/tests/common/cron.js +++ b/tests/common/cron.js @@ -2,13 +2,10 @@ require('../../index'); require('../../test'); -// @TODO: incomplete test - F.http(); ON('ready', function () { Test.push('CRON', function (next) { - // 08:10 ---> 27 8 * * * CRON('{0} * * *'.format(NOW.add('1 minute').format('mm HH')), function () { Test.print('In 1 minute - success'); @@ -26,15 +23,94 @@ ON('ready', function () { Test.print('In 1 minute - Full date 2 - success'); }); - - CRON('*/1 * * * *'.format(NOW.add('1 minute').format('mm HH dd MM')), function () { + CRON('*/1 * * * *', function () { Test.print('Every 1 minute - success'); }); - CRON('*/2 * * * *'.format(NOW.add('1 minute').format('mm HH dd MM')), function () { + CRON('*/2 * * * *', function () { Test.print('Every 2 minutes - success'); }); + CRON('0 12 * * *', function () { + Test.print('At 12:00 PM daily - success'); + }); + + CRON('0 12 * * 1-5', function () { + Test.print('At 12:00 PM Monday to Friday - success'); + }); + + CRON('0 0 * * 1', function () { + Test.print('At 12:00 AM every Monday - success'); + }); + + CRON('0 */2 * * *', function () { + Test.print('Every 2 hours - success'); + }); + + CRON('0 0 */3 * *', function () { + Test.print('At midnight every 3 days - success'); + }); + + CRON('0 0 1 */2 *', function () { + Test.print('At midnight on the 1st day of every other month - success'); + }); + + CRON('0 0 1 1 *', function () { + Test.print('At midnight on January 1st - success'); + }); + + CRON('0 0 1 1,4,7,10 *', function () { + Test.print('At midnight on January, April, July, and October 1st - success'); + }); + + CRON('0 0 1 1-5 *', function () { + Test.print('At midnight on the 1st to 5th day of every month - success'); + }); + + CRON('0 0 1 * *', function () { + Test.print('At midnight on the 1st day of every month - success'); + }); + + CRON('0 0 1 * *', function () { + Test.print('At midnight on the 1st day of every month - success'); + }); + + CRON('0 0 * * *', function () { + Test.print('At the start of every hour - success'); + }); + + CRON('0 8-17 * * *', function () { + Test.print('Every hour from 8 AM to 5 PM - success'); + }); + + CRON('0 12 * * 1-5', function () { + Test.print('At 12:00 PM from Monday to Friday - success'); + }); + + CRON('0 0 1 */3 *', function () { + Test.print('At midnight on the 1st of every third month - success'); + }); + + CRON('0 0 * * *', function () { + Test.print('At midnight every day - success'); + }); + + CRON('0 0 1 1 *', function () { + Test.print('At midnight on January 1st - success'); + }); + + CRON('0 0 1 * *', function () { + Test.print('At midnight on the 1st day of every month - success'); + }); + + CRON('0 0 * * *', function () { + Test.print('At the start of every hour - success'); + }); + + CRON('0 8-17 * * *', function () { + Test.print('Every hour from 8 AM to 5 PM - success'); + }); + }); setTimeout(function () { diff --git a/tests/filestorage/config b/tests/filestorage/config new file mode 100644 index 0000000..d4ea686 --- /dev/null +++ b/tests/filestorage/config @@ -0,0 +1 @@ +fs : files \ No newline at end of file diff --git a/tests/filestorage/controllers/default.js b/tests/filestorage/controllers/default.js new file mode 100644 index 0000000..c7dd474 --- /dev/null +++ b/tests/filestorage/controllers/default.js @@ -0,0 +1,36 @@ +exports.install = function() { + + ROUTE('POST /upload/ @upload <5MB', upload); // Max. 5 MB + +}; + +function upload($) { + + var output = []; + + $.files.wait(function(file, next) { + + var obj = {}; + + obj.id = UID(); + obj.filename = file.filename; + obj.size = file.size; + obj.type = file.type; + obj.ext = file.extension; + obj.url = '/downloads/' + obj.id + '.' + obj.ext; + + file.fs(CONF.fs, obj.id, function(err) { + + if (!err) + output.push(obj); + + next(); + }); + + }, function() { + + // Returns JSON with list of uploaded and stored files + $.json(output.length > 1 ? output : output[0]); + + }); +} \ No newline at end of file diff --git a/tests/filestorage/controllers/download.js b/tests/filestorage/controllers/download.js new file mode 100644 index 0000000..5a50df7 --- /dev/null +++ b/tests/filestorage/controllers/download.js @@ -0,0 +1,9 @@ +exports.install = function() { + ROUTE('FILE /downloads/*.*', download); +}; + +function download(req, res) { + var filename = req.split[1]; + var id = filename.substring(0, filename.lastIndexOf('.')); + res.filefs(CONF.fs, id); +} \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file b/tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file new file mode 100644 index 0000000..c2cacdd --- /dev/null +++ b/tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.211Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file b/tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file new file mode 100644 index 0000000..f381bbc --- /dev/null +++ b/tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.019Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file b/tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file new file mode 100644 index 0000000..ddbe116 --- /dev/null +++ b/tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.599Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file b/tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file new file mode 100644 index 0000000..7ffe93b --- /dev/null +++ b/tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:27.319Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file b/tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file new file mode 100644 index 0000000..021112c --- /dev/null +++ b/tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:02:48.365Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file b/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file new file mode 100644 index 0000000..c962763 --- /dev/null +++ b/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.009Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file b/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file new file mode 100644 index 0000000..034cc3a --- /dev/null +++ b/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.022Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file b/tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file new file mode 100644 index 0000000..56d11f9 --- /dev/null +++ b/tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:04.511Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file b/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file new file mode 100644 index 0000000..c4303a4 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.200Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file b/tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file new file mode 100644 index 0000000..c907e78 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T00:56:21.574Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file b/tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file new file mode 100644 index 0000000..c185704 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:20:40.199Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file b/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file new file mode 100644 index 0000000..88bde94 --- /dev/null +++ b/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.592Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file b/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file new file mode 100644 index 0000000..efeb324 --- /dev/null +++ b/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:27.312Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file b/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file new file mode 100644 index 0000000..4dadc75 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:04.520Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file b/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file new file mode 100644 index 0000000..ef0d05c --- /dev/null +++ b/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:03:20.638Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log new file mode 100644 index 0000000..d116045 --- /dev/null +++ b/tests/filestorage/databases/fs-files/files.log @@ -0,0 +1,15 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T00:56:21.574Z","id":"IgO5QN1cH61f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:02:48.365Z","id":"IgO6Ql1c461f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:03:20.638Z","id":"IgO6Vy1cU61f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:20:40.199Z","id":"IgO9Dd1cX61f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:04.511Z","id":"IgO9HZ1cg61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:04.520Z","id":"IgO9HZ1dg60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:27.312Z","id":"IgO9LF1cd61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:27.319Z","id":"IgO9LF1dd60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.592Z","id":"IgOGPf1cn61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.599Z","id":"IgOGPf1dn60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.200Z","id":"IgOGpZ1cY61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.211Z","id":"IgOGpa1dY60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.009Z","id":"IgOH6d1cQ61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.019Z","id":"IgOH6e1dQ60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.022Z","id":"IgOH6e1eQ61f"} diff --git a/tests/filestorage/index.js b/tests/filestorage/index.js new file mode 100644 index 0000000..c1c9930 --- /dev/null +++ b/tests/filestorage/index.js @@ -0,0 +1,63 @@ +require('../../index'); +require('../../test'); + +F.run({ port: 8000, release: false }); + +var url = 'http://localhost:8000'; + +ON('ready', function() { + + Test.push('FileStorage - ', function(next) { + var arr = []; + var filestorage = FILESTORAGE(CONF.fs); + + // arr.push(function(resume) { + //RESTBuilder.POST(url + '/upload').file('logo', 'logo.svg', 'https://www.totaljs.com/download/IYsqOb1cr61f.svg').exec(function(err, response) { + // Test.print('FS - upload', err === null && response ? null : 'Failed to upload file'); + // resume(); + // }); + // }); + + + arr.push(function(resume) { + var filename = 'smallfile.txt'; + var id = UID(); + filestorage.save(id, filename, PATH.root(filename), function(err, response) { + console.log(response); + Test.print('FS - save - file', err === null && response ? null : 'Failed to save file'); + resume(); + }); + }); + + arr.push(function(resume) { + var filename = 'smallfile.txt'; + var id = UID(); + + Total.Fs.readFile(PATH.root(filename), { encode: 'base64' }, function(err, base64) { + filestorage.save(id, filename, Buffer.from(base64, 'base64'), function(err, response) { + Test.print('FS - save - base64', err === null && response ? null : 'Failed to save file'); + resume(); + }); + }); + }); + + arr.push(function(resume) { + var filename = 'smallfile.txt'; + var id = UID(); + + var stream = Total.Fs.createReadStream(PATH.root(filename)); + + filestorage.save(id, filename, stream, function(err, response) { + Test.print('FS - save - stream', err === null && response ? null : 'Failed to save file'); + resume(); + }); + }); + arr.async(next); + }); + + setTimeout(function() { + Test.run(function() { + console.log('DONE'); + }); + }, 5000); +}); \ No newline at end of file diff --git a/tests/filestorage/smallfile.txt b/tests/filestorage/smallfile.txt new file mode 100644 index 0000000..c2db0df --- /dev/null +++ b/tests/filestorage/smallfile.txt @@ -0,0 +1,21 @@ +The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/tmp/upload_1.bin b/tests/filestorage/tmp/upload_1.bin new file mode 100644 index 0000000..e69de29 diff --git a/tests/minificators/index.js b/tests/minificators/index.js index b60958f..55ddb24 100644 --- a/tests/minificators/index.js +++ b/tests/minificators/index.js @@ -3,64 +3,131 @@ require('../../index'); require('../../test'); -// .js -// .css -// .html -// with and without comments - Test.push('Minifactors', function(next) { - // Test.print('String.slug()', [error]); var value, response, correct; var arr = []; - arr.push(function(next_fn) { + arr.push(function(resume) { correct = 'var arr=[1,2,3,4,5,6,7,8];arr.wait(function(item){console.log(item)},function(){console.log(data)});'; Total.Fs.readFile(PATH.public('script.js'), function(err, data) { if (data) value = data.toString(); var response = U.minify_js(value); Test.print(' Minify - JS (without comments)', response !== null && response === correct ? null : 'Something went rong'); - next_fn(); + resume(); }); }); - arr.push(function(next_fn) { + arr.push(function(resume) { correct = 'var arr=[1,2,3,4,5,6,7,8];arr.wait(function(item){console.log(item)},function(){console.log(data)});'; Total.Fs.readFile(PATH.public('script2.js'), function(err, data) { if (data) value = data.toString(); var response = U.minify_js(value); Test.print(' Minify - JS (with comments)', response !== null && response === correct ? null : 'Something went rong'); - next_fn(); + resume(); + }); + }); + + // arr.push(function(resume) { + // correct = 'var arr=[1,2,3,4,5,6,7,8];arr.wait(function(item){console.log(item)},function(){console.log(data)});'; + // Total.Fs.readFile(PATH.public('script_multiline_string.js'), function(err, data) { + // if (data) + // value = data.toString(); + // var response = U.minify_js(value); + + // Test.print('Minify - JS (Multiline String)', response !== null && response === correct ? null : 'Something went rong'); + // resume(); + // }); + // }); + + // arr.push(function(resume) { + // correct = 'const REG_HTML_2=/\s{2,}/g;const REG_HTML_4=/\n\s{2,}./g;const REG_HTML_5=/>\n\s{1,} +This is just a good job +

`; + +arr.wait(function(item) { + console.log(item); +}, function() { + console.log(html); +}); \ No newline at end of file diff --git a/tests/minificators/public/script_multiple_var.js b/tests/minificators/public/script_multiple_var.js new file mode 100644 index 0000000..4afcc70 --- /dev/null +++ b/tests/minificators/public/script_multiple_var.js @@ -0,0 +1,12 @@ +var arr = [1, 2, 3, 4, 5, 6, 7, 8]; + +var a; +var b; +var cd; + + +arr.wait(function(item) { + console.log(item); +}, function() { + console.log(data); +}); \ No newline at end of file diff --git a/tests/minificators/public/script_regex.js b/tests/minificators/public/script_regex.js new file mode 100644 index 0000000..9bbbb4e --- /dev/null +++ b/tests/minificators/public/script_regex.js @@ -0,0 +1,14 @@ +const REG_HTML_2 = /\s{2,}/g; +const REG_HTML_4 = /\n\s{2,}./g; +const REG_HTML_5 = />\n\s{1,} 0 ? null : 'Expected at least one document'); - resume(); - }); - }); - - arr.push(function(resume) { - var builder = NOSQL('users').read(); - var name = 'Peter Sirka'; - builder.where('name', name).callback(function(err, response) { - Test.print('NOSQL - read()', err === null && response.name === name ? null : 'Expected a document witn name = ' + name); - resume(); - }); - }); - - arr.push(function(resume) { - var email = 'petersirka@gmail.com'; - var name = 'Peter Širka'; - NOSQL('users').update({ name }).where('email', email).callback(function(err, response) { - Test.print('NOSQL - update()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); - resume(); - }); - }); - - arr.push(function(resume) { - var email = 'petersirka@gmail.com'; - NOSQL('users').remove().where('email', email).callback(function(err, response) { - Test.print('NOSQL - remove()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); - resume(); - }); - }); - - - arr.push(function(resume) { - DATA.insert('nosql/users', { id: UID(), name: 'Peter Sirka', email: 'petersirka@gmail.com' }).callback(function(err, response) { - Test.print('DATA/nosql - insert()', err === null && response === 1 ? null: 'Expected 1'); - resume() - }); - }); - - // arr.push(function(resume) { - // var doc = { id: UID(), name: 'Peter Sirka', email: 'petersirka@gmail.com' }; - // DATA.insert('nosql/users', doc, true).where('email', doc.email).callback(function(err, response) { - // console.log(response); - // Test.print('DATA/nosql - insert() unique', err === null && response === 0 ? null: 'Expected 1'); - // resume() - // }); - // }); - - arr.push(function(resume) { - var builder = DATA.find('nosql/users'); - var name = 'Peter Sirka'; - builder.where('name', name).callback(function(err, response) { - Test.print('DATA/nosql - find()', err === null && response.length > 0 ? null : 'Expected at least one document'); - resume(); - }); - }); - - arr.push(function(resume) { - var builder = DATA.read('nosql/users'); - var name = 'Peter Sirka'; - builder.where('name', name).callback(function(err, response) { - Test.print('DATA/nosql - read()', err === null && response.name === name ? null : 'Expected a document witn name = ' + name); - resume(); - }); - }); - - arr.push(function(resume) { - var email = 'petersirka@gmail.com'; - var name = 'Peter Širka'; - DATA.update('nosql/users', { name }).where('email', email).callback(function(err, response) { - Test.print('DATA/nosql - update()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); - resume(); - }); - }); - - arr.push(function(resume) { - var email = 'petersirka@gmail.com'; - DATA.remove('nosql/users').where('email', email).callback(function(err, response) { - Test.print('DATA/nosql - remove()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); - resume(); - }); - }); - - arr.async(next); + var arr = []; + var builder; + arr.push(function(resume) { + NOSQL('users').insert({ id: UID(), name: 'Peter Sirka', email: 'petersirka@gmail.com', country: 'Slovakia', dtcreated: NOW }).callback(function(err, response) { + Test.print('NOSQL - insert()', err === null && response === 1 ? null: 'Expected 1'); + resume() + }); + }); + + + arr.push(function(resume) { + var builder = NOSQL('users').find(); + var name = 'Peter Sirka'; + builder.where('name', name).callback(function(err, response) { + Test.print('NOSQL - find()', err === null && response.length > 0 ? null : 'Expected at least one document'); + resume(); + }); + }); + + arr.push(function(resume) { + var builder = NOSQL('users').find(); + var query = { email: 'petersirka@gmail.com' }; + builder.autoquery(query, 'name:String,email:Email', 'dtcreated_desc', 100); + builder.callback(function(err, response) { + Test.print('NOSQL - autoquery()', err === null && response.length > 0 && response[0].email == query.email ? null : 'Expected at least one document'); + resume(); + }); + }); + + arr.push(function(resume) { + var builder = NOSQL('users').read(); + var name = 'Peter Sirka'; + builder.where('name', name).callback(function(err, response) { + Test.print('NOSQL - read()', err === null && response.name === name ? null : 'Expected a document witn name = ' + name); + resume(); + }); + }); + + arr.push(function(resume) { + var email = 'petersirka@gmail.com'; + var name = 'Peter Širka'; + NOSQL('users').update({ name }).where('email', email).callback(function(err, response) { + Test.print('NOSQL - update()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); + resume(); + }); + }); + + arr.push(function(resume) { + var email = 'petersirka@gmail.com'; + NOSQL('users').remove().where('email', email).callback(function(err, response) { + Test.print('NOSQL - remove()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); + resume(); + }); + }); + + arr.push(function(resume) { + NOSQL('users').clean().callback(function(err) { + Test.print('NOSQL - Clean()', err == undefined ? null : 'Failled to clean table'); + resume(); + }); + }); + + arr.push(function(resume) { + NOSQL('users').drop().callback(function(response) { + Test.print('NOSQL - Drop()', response && response.success ? null : 'Failed to drop table'); + resume(); + }); + }); + + arr.push(function(resume) { + DATA.insert('nosql/users', { id: UID(), name: 'Peter Sirka', email: 'petersirka@gmail.com' }).callback(function(err, response) { + Test.print('DATA/nosql - insert()', err === null && response === 1 ? null: 'Expected 1'); + resume() + }); + }); + + arr.push(function(resume) { + DATA.insert('nosql/users', { id: UID(), name: 'Peter Sirka', email: 'petersirka@gmail.com' }).callback(function(err, response) { + Test.print('DATA/nosql - insert()', err === null && response === 1 ? null: 'Expected 1'); + resume() + }); + }); + + arr.push(function(resume) { + var builder = DATA.find('nosql/users'); + var name = 'Peter Sirka'; + builder.where('name', name).callback(function(err, response) { + Test.print('DATA/nosql - find()', err === null && response.length > 0 ? null : 'Expected at least one document'); + resume(); + }); + }); + + arr.push(function(resume) { + var builder = DATA.find('nosql/users'); + var query = { email: 'petersirka@gmail.com' }; + builder.autoquery(query, 'name:String,email:Email', 'dtcreated_desc', 100); + builder.callback(function(err, response) { + Test.print('DATA/nosql - autoquery()', err === null && response.length > 0 ? null : 'Expected at least one document'); + resume(); + }); + }); + + + arr.push(function(resume) { + var builder = DATA.read('nosql/users'); + var name = 'Peter Sirka'; + builder.where('name', name).callback(function(err, response) { + Test.print('DATA/nosql - read()', err === null && response.name === name ? null : 'Expected a document witn name = ' + name); + resume(); + }); + }); + + arr.push(function(resume) { + var email = 'petersirka@gmail.com'; + var name = 'Peter Širka'; + DATA.update('nosql/users', { name }).where('email', email).callback(function(err, response) { + Test.print('DATA/nosql - update()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); + resume(); + }); + }); + + arr.push(function(resume) { + var email = 'petersirka@gmail.com'; + DATA.remove('nosql/users').where('email', email).callback(function(err, response) { + Test.print('DATA/nosql - remove()', err === null && response > 0 ? null : 'Expected a document with at least 1 success'); + resume(); + }); + }); + + arr.async(next); }); Test.run(); \ No newline at end of file diff --git a/tests/proxy/index.js b/tests/proxy/index.js index aad3c95..fe3d972 100644 --- a/tests/proxy/index.js +++ b/tests/proxy/index.js @@ -12,10 +12,22 @@ var token_after = GUID(35); ROUTE('GET /', $ => $.success()); +PROXY('/cl/none/', 'https://flowstream.totalavengers.com/cl/none').copy('none'); +PROXY('/cl/replace/', 'https://flowstream.totalavengers.com/cl/replace').copy('replace'); +PROXY('/cl/extend/', 'https://flowstream.totalavengers.com/cl/extend').copy('extend'); + PROXY('/cl/before/', 'https://flowstream.totalavengers.com/cl').before(function(uri, $) { $.headers['x-token'] = token_before; }); +PROXY('/cl/remove/', 'https://flowstream.totalavengers.com/cl').after(function(response) { + var t = this; + setTimeout(function() { + t.remove(); + }, 3000); +}); + + PROXY('/cl/after/', 'https://flowstream.totalavengers.com/cl').after(function(response) { Test.print('After - Response code : ' + ( response ? response.statusCode : 'Null '), response ? null : 'Expected appended token in response'); }); @@ -33,9 +45,55 @@ ON('ready', function() { // Test.print('String.slug()', [error]); var arr = []; + var correct; + var correct2; + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/none').exec(function(err, res) { + console.log(err, res); + correct = {}; + Test.print('Copy - None mode ', err === null && res.toString() == correct.toString() ? null : 'Expected empty object in response'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/none/something').exec(function(err, res) { + correct = {}; + Test.print('Copy - None mode 2', err === null && res.toString() == correct.toString() ? null : 'Expected empty object'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/replace?q=search').exec(function(err, res) { + Test.print('Copy - Replace mode ', err === null && res && res.q && res.q === 'search' ? null : 'Expected appended token in response'); + resume(); + }); + }); arr.push(function(resume) { - RESTBuilder.GET(url + '/cl/before').exec(function(err, res, output) { + RESTBuilder.GET(url + '/cl/replace/something?q=search').exec(function(err, res) { + Test.print('Copy - Replace mode 2', err === null && res && res.q && res.q === 'search' ? null : 'Expected appended token in response'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/extend?q=search').exec(function(err, res) { + Test.print('Copy - Extend mode ', err === null && res && res.q && res.q === 'search' ? null : 'Expected appended token in response'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/extend/something?q=search').exec(function(err, res) { + Test.print('Copy - Extend mode 2', err === null && res && res.q && res.q === 'search' ? null : 'Expected appended token in response'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/before').exec(function(err, res) { Test.print('Before - Added `x-token` header', err === null && res && res.token && res.token === token_before ? null : 'Expected appended token in response'); resume(); }); @@ -47,7 +105,14 @@ ON('ready', function() { resume(); }); }); - + + arr.push(function(resume) { + RESTBuilder.GET(url + '/cl/remove').exec(function(err) { + Test.print('Remove proxy - test: ' + err, err !== null ? null : 'Expected 404 error code'); + resume(); + }); + }); + arr.push(function(resume) { RESTBuilder.GET(url + '/cl/check/for_app?status=valid').exec(function(err, response) { Test.print('Check - Handle with app ', err && err === 404 ? null : 'Handle by ') @@ -63,7 +128,7 @@ ON('ready', function() { }); arr.async(next); - }); + }); - setTimeout(Test.run, 500); + setTimeout(Test.run, 2000); }); \ No newline at end of file diff --git a/tests/routing/controllers/sockets.js b/tests/routing/controllers/sockets.js index bf65428..2224acf 100644 --- a/tests/routing/controllers/sockets.js +++ b/tests/routing/controllers/sockets.js @@ -1,5 +1,7 @@ exports.install = function() { ROUTE('SOCKET /', main); + ROUTE('SOCKET /mode/text/ @text', text); + ROUTE('SOCKET /mode/binary/ @binary', binary); ROUTE('SOCKET /reconnect/', reconnect); ROUTE('+SOCKET /authorized/', simple); ROUTE('-SOCKET /unauthorized/', simple); @@ -85,4 +87,112 @@ function main() { }); +} + +function text() { + + var self = this; + + self.on('message', function(client, message) { + + // Convert + switch (message.type) { + case 'Buffer': + message = JSON.parse(Buffer.from(message.data)); + break; + } + + // Commands + switch (message.command) { + + case 'start': + client.send({ command: 'query', data: client.query.query }); + break; + + case 'headers': + client.send({ command: 'headers', data: client.headers['x-token'] }); + break; + + case 'cookies': + client.send({ command: 'cookies', data: client.cookie('cookie') }); + break; + + case 'options_uncompressed': + client.send({ command: 'options_uncompressed', data: message.data }); + break; + + case 'options_compressed': + client.send({ command: 'options_compressed', data: message.data }); + break; + + case 'options_type_binary': + client.send({ command: 'options_type_binary', data: message.data }); + break; + + case 'close': + client.send({ command: 'close' }); + break; + + default: + client.send({ command: 'error', data: 'Unhandled case' }); + break; + + } + + }); + +} + +function binary() { + + var self = this; + + self.on('message', function(client, message) { + + // Convert + switch (message.type) { + case 'Buffer': + message = JSON.parse(Buffer.from(message.data)); + break; + } + + // Commands + switch (message.command) { + + case 'start': + client.send({ command: 'query', data: client.query.query }); + break; + + case 'headers': + client.send({ command: 'headers', data: client.headers['x-token'] }); + break; + + case 'cookies': + client.send({ command: 'cookies', data: client.cookie('cookie') }); + break; + + case 'options_uncompressed': + client.send({ command: 'options_uncompressed', data: message.data }); + break; + + case 'options_compressed': + client.send({ command: 'options_compressed', data: message.data }); + break; + + case 'options_type_binary': + client.send({ command: 'options_type_binary', data: message.data }); + break; + + case 'close': + client.send({ command: 'close' }); + break; + + default: + client.send({ command: 'error', data: 'Unhandled case' }); + break; + + } + + }); + } \ No newline at end of file diff --git a/tests/routing/definitions/middleware.js b/tests/routing/definitions/middleware.js index fcbf9db..4bbaea5 100644 --- a/tests/routing/definitions/middleware.js +++ b/tests/routing/definitions/middleware.js @@ -1,8 +1,8 @@ MIDDLEWARE('middlewaresuccess', ($, next) => next()); MIDDLEWARE('middlewareinvalid', ($, next) => $.invalid(400)); MIDDLEWARE('middlewaresocket', ($, next) => { - EMIT('middlewaresocket_close', { command: 'close' }); - next(); + EMIT('middlewaresocket_close', { command: 'close' }); + next(); }); // F.use('middlewarefuse', '/middleware/fuse'); // @TODO: F.use is not a function diff --git a/tests/routing/draft.js b/tests/routing/draft.js deleted file mode 100644 index ff1031e..0000000 --- a/tests/routing/draft.js +++ /dev/null @@ -1,357 +0,0 @@ -/* eslint-disable */ -require('../../index'); -require('../../test'); -// API routing -// WebSocket routing + WebSocketClient (text, json and binary communication) -// File routing -// Removing routess - -F.console = NOOP; - -// load web server and test app -F.http(); - - - -var url = 'http://0.0.0.0:8000'; - - -ON('ready', function() { - - // HTTP routing - Test.push('HTTP Routing - Basics', function(next) { - MAIN.items && MAIN.items.wait(function(item, n) { - RESTBuilder.GET(url + item.url).exec(function(err, res, output) { - res = output.response; - Test.print('Routes - Params {0}'.format(item.url), res !== item.res ? 'TEST {0} failed'.format(item.url) : null); - n(); - }); - }, function() { - next(); - }); - }); - - Test.push('HTTP Routing - methods', function(next) { - - MAIN.methods && MAIN.methods.wait(function(method, n) { - RESTBuilder[method](url + '/methods').exec(function(err, response, output) { - Test.print('Methods - {0} /methods/'.format(method), !response.success ? 'TEST {0} /methods/ failed'.format(method) : null); - n(); - }) - }, function() { - next() - }); - }); - - Test.push('HTTP Routing - Case sensitive and Middleware', function(next) { - - var arr = []; - - // Sensitive case - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/uPperCase/').exec(function(err, res) { - Test.print('Sensitive case', err === null && res && res.success === true ? null : 'Expected Success'); - next_fn(); - }); - }); - - // Middleware success - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/middleware/success/').exec(function(err, res) { - console.log(err, res); - Test.print('Middleware - Success', err === null && res && res.success === true ? null : 'Expected success response'); - next_fn(); - }); - }); - - // Middleware invalid - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/middleware/invalid/').exec(function(err, res) { - Test.print('Middleware - Invalid', err && err.status === 400 ? null : 'Expected an error'); - next_fn(); - }); - }); - - - arr.async(function() { - next(); - }); - }); - - Test.push('HTTP Routing - Methods and validation', function(next) { - var arr = []; - - var methods = [{ name: 'GET', validate: false }, { name: 'POST', validate: true }, { name: 'PUT', validate: true }, { name: 'PATCH', validate: true }, { name: 'DELETE', validate: true }]; - - // Method data validation - arr.push(function(next_fn) { - methods.wait(function(method, next) { - RESTBuilder[method.name](url + '/schema/methods/validation').exec(function(err, res) { - if (method.validate) - Test.print('Validation ' + method.name, err !== null && !res ? null : 'Expected validation error'); - else - Test.print('No Validation' + method.name, err === null && res ? null : 'Expected No validation error'); - - next(); - }); - }, function() { - next_fn(); - }); - }); - - // PATCH / DELETE with validation (invalid) - arr.push(function(next_fn) { - var methods = ['PATCH', 'DELETE']; - - methods.wait(function(method, next) { - RESTBuilder[method](url + '/schema/methods/validation', { email: 'not_email' }).exec(function(err, res) { - if (method) - Test.print('Validation ' + method, err !== null ? null : 'Expected error'); - next(); - }); - }, function() { - next_fn(); - }); - }); - - - arr.async(function() { - next(); - }) - }) - - Test.push('HTTP Routing - Authorization', function(next) { - var arr = []; - - // X-token - arr.push(function(next_fn) { - var token = 'token123'; - RESTBuilder.GET(url + '/xtoken').header('x-token', token).exec(function(err, res) { - Test.print('X - Token ', err === null && res && res.value === token ? null : 'Expected value to be ' + token); - next_fn(); - }); - }); - - // Authorized user - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/auth').cookie('auth', 'correct-cookie').exec(function(err, res, output) { - Test.print('Authorized user', output.status === 200 && err === null && res && res.value === '123' ? null : 'Expected authorized user id (123)'); - next_fn(); - }); - }); - - // Unauthorized user - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/auth').cookie('auth', 'wrong-cookie').exec(function(err, res, output) { - Test.print('Unauthorized user', output.status === 200 && err === null && res && !res.value ? null : 'Expected no value'); - next_fn(); - }); - }); - - // Authorized route - authorized user - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/auth/authorized/').cookie('auth', 'correct-cookie').exec(function(err, res, output) { - Test.print('Authorized route - Authorized user', output.status === 200 && err === null && res && res.value === '123' ? null : 'Expected authorized user id (123)'); - next_fn(); - }); - }); - - // Authorized route - unauthorized user - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/auth/authorized/').cookie('auth', 'wrong-cookie').exec(function(err, res, output) { - Test.print('Unauthorized route - Unauthorized user', output.status === 401 && res && !res.value ? null : 'Expected no value'); - next_fn(); - }); - }); - - arr.async(function() { - next(); - }) - }); - - - Test.push('HTTP Routing - Internal routing And wildcard', function(next) { - var arr = []; - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/not/existing').exec(function(err, res) { - Test.print('Internal Routing - 404', err === null && res && res.status === 404 && res.value === 'Not found') - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/internal/503').exec(function(err, res) { - Test.print('Internal Routing - 503', err === null && res && res.status === 503 && res.value === 'Server Error') - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/internal/408').exec(function(err, res) { - Test.print('Internal Routing - 408', err === null && res && res.status === 408 && res.value === 'Request Timeout') - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/wild').exec(function(err, res) { - Test.print('Wildcards - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/wild/wild').exec(function(err, res) { - Test.print('Wildcards 2 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/wild/wild/wild').exec(function(err, res) { - Test.print('Wildcards 3 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/wild/wild/wild/wild').exec(function(err, res) { - Test.print('Wildcards 3 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/second/2/43/this-is-slog/wild').exec(function(err, res) { - Test.print('Wildcards 4 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/second/2/43/this-is-slog/wild/wild/wild/').exec(function(err, res) { - Test.print('Wildcards 5 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - arr.push(function(next_fn) { - RESTBuilder.GET(url + '/wildcards/second/2/43/t/wild/wild/wild/').exec(function(err, res) { - Test.print('Wildcards 6 - *', err === null && res && res.success === true && res.value === 1) - next_fn(); - }); - }); - - - arr.async(function() { - next(); - }) - - }); - - Test.push('API Routing', function(next) { - var arr = []; - var path = '/v1/'; - - arr.push(function(next_fn) { - RESTBuilder.API(url + path, 'api_basic').exec(function(err, response) { - Test.print('API Routing - Basic ', err === null && response.success === true ? null: 'Expected success response'); - next_fn(); - }); - }); - - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - - RESTBuilder.API(url + path, 'api_validation', data).exec(function(err, response) { - Test.print('API Routing - Validation (+) ', err === null && response.success === true ? null: ''); - next_fn(); - }); - }); - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - RESTBuilder.API(url + path, 'api_novalidation', data).exec(function(err, response) { - Test.print('API Routing - Validation (-) ', err === null && response.success === true ? null: ''); - next_fn(); - }); - }); - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - - RESTBuilder.API(url + path, 'api_patch', data).exec(function(err, response) { - Test.print('API Routing - Patch validation (#)', err === null && response.success && response.value.valid === data.valid ? null : 'Validation error'); - Test.print('API Routing - Patch validation (#)', response.value.invalid !== data.invalid ? null : 'Invalid data returned'); - - next_fn(); - }); - }); - - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - - RESTBuilder.API(url + path, 'api_keys', data).exec(function(err, response) { - Test.print('API Routing - Patch Keys', err === null && response.success ? null : 'Expected success response'); - Test.print('API Routing - Patch Keys', response.value.includes('valid') ? null : 'Valid key not found'); - Test.print('API Routing - Patch Keys', !response.value.includes('invalid') ? null : 'Invalid key found'); - - next_fn(); - }); - }); - - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - - RESTBuilder.API(url + path, 'api_keys_multi', data).exec(function(err, response) { - Test.print('API Routing - Patch Keys (multioperation)', !err && response && response.value && response.value.includes(data.valid) && !response.value.includes(data.invalid) ? null : 'PATCH - Multiple operation keys failed'); - - next_fn(); - }); - }); - - - arr.async(function() { - next(); - }); - }); - - - Test.push('API Routing: Actions', function(next) { - var arr = []; - var path = '/v1/'; - - arr.push(function(next_fn) { - RESTBuilder.API(url + path, 'api_action_basic').exec(function(err, response) { - Test.print('API Routing - Basic', err === null && response.success ? null : 'Expected success response'); - next_fn(); - }); - }); - - arr.push(function(next_fn) { - var data = { valid: 'valid', invalid: 'invalid' }; - - RESTBuilder.API(url + path, 'api_action_validation', data).exec(function(err, response) { - Test.print('API Routing - Validation (+)', err === null && response.success && response.value && response.value.valid === data.valid ? null : 'Validation error'); - Test.print('API Routing - Validation (+)', response.value.invalid !== data.invalid ? null : 'Invalid data returned'); - - next_fn(); - }); - }); - - - - }); - - - setTimeout(function() { - Test.run(function() { - //process.exit(0); - }); - }, 1000); -}); - diff --git a/tests/routing/schemas/apirouting.js b/tests/routing/schemas/apirouting.js index 269381f..aa31361 100644 --- a/tests/routing/schemas/apirouting.js +++ b/tests/routing/schemas/apirouting.js @@ -1,31 +1,31 @@ NEWSCHEMA('APIRoutes', function(schema) { - schema.action('success', { - name: 'Success action', - input: 'valid:String', - action: function($, model) { - $.success(model); - } - }); + schema.action('success', { + name: 'Success action', + input: 'valid:String', + action: function($, model) { + $.success(model); + } + }); - schema.action('keys', { - name: 'Get keys', - action: function($, model) { - $.success(Object.keys(model)); - } - }); + schema.action('keys', { + name: 'Get keys', + action: function($, model) { + $.success(Object.keys(model)); + } + }); - schema.action('one', { - name: 'Get one', - action: function($) { - $.success(); - } - }); - - schema.action('two', { - name: 'Get two', - action: function($) { - $.success(); - } - }); + schema.action('one', { + name: 'Get one', + action: function($) { + $.success(); + } + }); + + schema.action('two', { + name: 'Get two', + action: function($) { + $.success(); + } + }); }); \ No newline at end of file diff --git a/tests/routing/schemas/auth.js b/tests/routing/schemas/auth.js index f03c1c9..98cbbcf 100644 --- a/tests/routing/schemas/auth.js +++ b/tests/routing/schemas/auth.js @@ -1,12 +1,12 @@ NEWSCHEMA('Auth', function(schema) { - schema.action('exec', { - name: 'Execution action', - action: function($) { + schema.action('exec', { + name: 'Execution action', + action: function($) { - if ($.user) - $.success('123'); - else - $.success(); - } - }); + if ($.user) + $.success('123'); + else + $.success(); + } + }); }); diff --git a/tests/routing/schemas/headers.js b/tests/routing/schemas/headers.js index 2473122..a639b07 100644 --- a/tests/routing/schemas/headers.js +++ b/tests/routing/schemas/headers.js @@ -1,10 +1,10 @@ NEWSCHEMA('Headers', function(schema) { - schema.action('xtoken', { - name: 'X-Token Action', - action: function($) { - $.success($.headers['x-token']); - } - }); + schema.action('xtoken', { + name: 'X-Token Action', + action: function($) { + $.success($.headers['x-token']); + } + }); }); diff --git a/tests/routing/schemas/method.js b/tests/routing/schemas/method.js index db15ba4..f3bbdf5 100644 --- a/tests/routing/schemas/method.js +++ b/tests/routing/schemas/method.js @@ -1,8 +1,8 @@ NEWSCHEMA('Methods', function(schema) { schema.action('exec', { - name: 'Exec action', - action: function($) { - $.success(); - } - }); + name: 'Exec action', + action: function($) { + $.success(); + } + }); }); \ No newline at end of file diff --git a/tests/routing/schemas/middleware.js b/tests/routing/schemas/middleware.js index 8fdbab5..cffdecb 100644 --- a/tests/routing/schemas/middleware.js +++ b/tests/routing/schemas/middleware.js @@ -1,9 +1,9 @@ NEWSCHEMA('Middleware', function(schema) { - schema.action('exec', { - name: 'Execution action', - action: function($) { - $.success(); - } - }); + schema.action('exec', { + name: 'Execution action', + action: function($) { + $.success(); + } + }); }); diff --git a/tests/routing/schemas/params.js b/tests/routing/schemas/params.js index aa2498d..547861f 100644 --- a/tests/routing/schemas/params.js +++ b/tests/routing/schemas/params.js @@ -1,30 +1,30 @@ NEWSCHEMA('Params', function(schema) { schema.action('alias', { - name: 'Alias action', - action: function($) { - $.callback($.params.id); - } - }); + name: 'Alias action', + action: function($) { + $.callback($.params.id); + } + }); schema.action('params', { - name: 'Params action', - action: function($) { - $.callback($.params.id); - } - }); + name: 'Params action', + action: function($) { + $.callback($.params.id); + } + }); - schema.action('params2', { - name: 'Params2 action', - action: function($) { - $.callback($.params.id2); - } - }); + schema.action('params2', { + name: 'Params2 action', + action: function($) { + $.callback($.params.id2); + } + }); - schema.action('params3', { - name: 'Params3 action', - action: function($) { - $.callback($.params.id3); - } - }); + schema.action('params3', { + name: 'Params3 action', + action: function($) { + $.callback($.params.id3); + } + }); }); \ No newline at end of file diff --git a/tests/routing/schemas/wildcards.js b/tests/routing/schemas/wildcards.js index 0b19fda..6f136e7 100644 --- a/tests/routing/schemas/wildcards.js +++ b/tests/routing/schemas/wildcards.js @@ -1,38 +1,38 @@ NEWSCHEMA('Wildcards', function(schema) { - schema.action('one', { - name: 'One action', - action: function($) { - $.success(1); - } - }); + schema.action('one', { + name: 'One action', + action: function($) { + $.success(1); + } + }); - schema.action('two', { - name: 'Two action', - action: function($) { - $.success(2); - } - }); + schema.action('two', { + name: 'Two action', + action: function($) { + $.success(2); + } + }); - schema.action('three', { - name: 'Three action', - action: function($) { - $.success(3); - } - }); + schema.action('three', { + name: 'Three action', + action: function($) { + $.success(3); + } + }); - schema.action('four', { - name: 'Four action', - action: function($) { - $.success(4); - } - }); + schema.action('four', { + name: 'Four action', + action: function($) { + $.success(4); + } + }); - schema.action('five', { - name: 'Five action', - action: function($) { - $.success(5); - } - }); + schema.action('five', { + name: 'Five action', + action: function($) { + $.success(5); + } + }); }); diff --git a/tests/routing/tms.js b/tests/routing/tms.js deleted file mode 100644 index 7c59a05..0000000 --- a/tests/routing/tms.js +++ /dev/null @@ -1,39 +0,0 @@ -require('../../index'); -require('../../test'); - -F.http(); - -if (!MAIN.client1) - MAIN.client1 = {}; - - -if (!MAIN.client2) - MAIN.client2 = {}; - - -ON('ready', function() { - var url = 'ws://localhost:8000/$tms/?token=' + CONF.secret_tms; - TMSCLIENT(url, function(err, client, meta) { - console.log(err, client, meta); - client.subscribe('users_create', function(data) { - console.log('NEW USER'); - }); - MAIN.client1 = client; - }); - - TMSCLIENT(url, function(err, client, meta) { - console.log(err, meta, client, meta); - MAIN.client2 = client; - console.log(err, meta); - }); - Test.push('TMS - ', function(next) { - MAIN.client2.publish('users_create', { name: 'Peter Sirka', email: 'petersirka@gmail.com' }); - next(); - }); - - setTimeout(function() { - Test.run(function() { - console.log('DONE'); - }); - }, 2000); -}); \ No newline at end of file diff --git a/tests/routing/tms.js.json b/tests/routing/tms.js.json deleted file mode 100644 index f4bf12f..0000000 --- a/tests/routing/tms.js.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "pid": 67904, - "date": "2024-03-04T08:55:28.419Z", - "stats": [ - { - "id": "", - "version": { - "node": "v20.8.0", - "total": "5", - "build": 5000, - "app": "1.0.0" - }, - "pid": 67904, - "mode": "debug", - "overload": 0, - "date": "2024-03-04T09:06:29.429Z", - "memory": 8.49, - "rm": 1, - "fm": 0, - "wm": 0, - "em": 0, - "mm": 0, - "om": 0, - "dm": 0, - "um": 0, - "pm": 0, - "sm": 0, - "cm": 0, - "dbrm": 0, - "dbwm": 0, - "usage": 0, - "requests": 3, - "pending": 0, - "external": 0, - "errors": 2, - "timeouts": 0, - "online": 0, - "download": 0, - "upload": 0, - "lasterror": "2024-03-04T08:55:31.008Z TypeError: MAIN.client2.publish is not a function\n at Object.fn (/Users/mac/Desktop/framework5/tests/routing/tms.js:30:22)\n at Array. (/Users/mac/Desktop/framework5/test.js:38:8)\n at AP.wait (/Users/mac/Desktop/framework5/utils.js:4655:9)\n at Test.run (/Users/mac/Desktop/framework5/test.js:36:13)\n at Timeout._onTimeout (/Users/mac/Desktop/framework5/tests/routing/tms.js:36:14)\n at listOnTimeout (node:internal/timers:573:17)\n at process.processTimers (node:internal/timers:514:7)" - } - ] -} \ No newline at end of file diff --git a/tests/run.js b/tests/run.js index 676ac7c..238aa10 100644 --- a/tests/run.js +++ b/tests/run.js @@ -3,6 +3,7 @@ require('../index'); var tests = []; // tests.push('bundles/index.js'); +// tests.push('common/cron.js'); tests.push('common/utils.js'); tests.push('minificators/index.js'); tests.push('nosql/index.js'); diff --git a/tests/schemas/index.js b/tests/schemas/index.js index 506ce04..324320f 100644 --- a/tests/schemas/index.js +++ b/tests/schemas/index.js @@ -24,6 +24,7 @@ ON('ready', function () { var methods = ['query', 'read', 'update', 'patch', 'remove', 'insert']; var valid = [ { number: 123, email: 'abc@abc.abc', phone: '+421123456789', boolean: true, uid: UID(), url: 'https://www.totaljs.com', object: {}, date: NOW, json: '{}', base64: 'c3VwZXJ1c2Vy' }, + { datauri: 'data:image/png;base64', zip: '23432', icon: 'ti ti-user', color: '#68B25B', guid: GUID(25), tinyint: 250, smallint: 3322, enums: 'red', inlineobject: { name:'Peter Sirka',email: 'petersirka@gmail.com' }, arrayobj: [{ name: 'Peter Sirka', email: 'pertersirka@gmail.com' }, { name: 'Louis Bertson', email: 'louisbertson@gmail.com' }], linkedschema: '@Address' }, { number: 123.123456, email: 'abc@abc.abc', boolean: '1', url: 'http://www.totaljs.com', date: new Date(), base64: 'c3VwZXJ1c2Vy' }, { email: 'abc.abc@abc.abc', url: 'http://totaljs.com' }, { url: 'https://totaljs.com' } @@ -31,12 +32,13 @@ ON('ready', function () { var invalid = [ { number: 'abc', email: 'ca@.sk', phone: 'notphone', boolean: '', uid: 'AV232CS@', url: 'url', date: 'today', json: null, base64: '' }, - { number: 'one', email: '@', phone: '12345667', boolean: '', json: '', base64: '' } + { number: 'one', email: '@', phone: '12345667', boolean: '', json: '', base64: '' }, + { datauri: 'data', zip: '232', icon: 'titi-uer', color: '#625', guid: 'ererddghvgcg', tinyint: 255, smallint: 33000000022, enums: 'yellow', inlineobject: {}, arrayobj: [ 'Peter Sirka', 'Louis Bertson' ], linkedschema: '@Address2' } ]; var fields = [ - { number: 123, email: 'ca@gmail.sk', phone: '+413233443344', boolean: false, uid: UID(), url: 'https://totaljs.com', date: NOW, json: '{"key":"value"}', base64: 'c3VwZXJ1c2Vy' }, - { number: 1, email: 'slovakia@gmail.sk', phone: '+41543454323', boolean: false, uid: UID(), url: 'https://totaljs.com/community', date: NOW, json: '{"anotherkey":"anothervalue"}', base64: 'c3VwZXJ1c2Vy' }, + { number: 123, email: 'ca@gmail.sk', phone: '+413233443344', boolean: false, uid: UID(), url: 'https://totaljs.com', date: NOW, json: '{"key":"value"}', base64: 'c3VwZXJ1c2Vy', datauri: 'data:image/png;base64', zip: '23432', icon: 'ti ti-user', color: '#68B25B', guid: GUID(25), tinyint: 250, smallint: 3322, enums: 'red', inlineobject: { name:'Peter Sirka',email: 'petersirka@gmail.com' }, arrayobj: [{ name: 'Peter Sirka', email: 'pertersirka@gmail.com' }, { name: 'Louis Bertson', email: 'louisbertson@gmail.com' }], linkedschema: '@Address' }, + { number: 1, email: 'slovakia@gmail.sk', phone: '+41543454323', boolean: false, uid: UID(), url: 'https://totaljs.com/community', date: NOW, json: '{"anotherkey":"anothervalue"}', base64: 'c3VwZXJ1c2Vy', datauri: 'data:image/png;base64', zip: '23432', icon: 'ti ti-user', color: '#68B25B', guid: GUID(25), tinyint: 250, smallint: 3322, enums: 'red', inlineobject: { name:'Peter Sirka',email: 'petersirka@gmail.com' }, arrayobj: [{ name: 'Peter Sirka', email: 'pertersirka@gmail.com' }, { name: 'Louis Bertson', email: 'louisbertson@gmail.com' }], linkedschema: '@Address' }, ]; function prefill_undefined(arr) { // Prefill missing fields in rows if 'undefined' based on index 0 row @@ -65,9 +67,9 @@ ON('ready', function () { // var methods = [{ name: 'GET', validate: false }, { name: 'POST', validate: true }, { name: 'PUT', validate: true }, { name: 'PATCH', validate: true }, { name: 'DELETE', validate: true }]; // methods.wait(function(method, next) { // RESTBuilder[method.name](url + '/schema/methods/validation').exec(function(err, res) { - // if (method.validate) + // if (method.validate) // Test.print('Schema data validation - Should validate ' + method.name, err !== null && !res ? null : 'Should Validate'); - // else + // else // Test.print('Schema data validation - Should not validate ' + method.name, err === null && res ? null : 'Should not validate'); // next(); @@ -105,6 +107,8 @@ ON('ready', function () { arr.push(function (resume) { + var guid = GUID(); + var datauri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; var data = { number: { i: 123, o: 123 }, number_float: { i: 123.456789, o: 123.456789 }, @@ -113,21 +117,31 @@ ON('ready', function () { string_capitalize: { i: 'camel časé1', o: 'Camel Časé1' }, string_capitalize2: { i: 'only first', o: 'Only first' }, string_lowercase: { i: 'LoWEr cAse', o: 'lower case' }, - string_uppercase: { i: 'UPper CaSe', o: 'UPPER CASE' } + string_uppercase: { i: 'UPper CaSe', o: 'UPPER CASE' }, + datauri: { i: datauri, o: datauri }, + zip: { i: '23432', o: '23432' }, + icon: { i: 'ti ti-user', o: 'ti ti-user' }, + color: { i: '#68B25B', o: '#68B25B' }, + guid: { i: guid, o: guid }, + tinyint: { i: 250, o: 250 }, + smallint: { i: 3322, o: 3322 }, + enums: { i: 'red', o: 'red' }, + inlineobject: { i: { name:'Peter Sirka', email: 'petersirka@gmail.com' }, o: { name:'Peter Sirka', email: 'petersirka@gmail.com' } }, + arrayobj:{i:[{name:'Peter Sirka',email:'pertersirka@gmail.com'},{name:'Louis Bertson',email:'louisbertson@gmail.com'}],o:[{name:'Peter Sirka',email:'pertersirka@gmail.com'},{name:'Louis Bertson',email:'louisbertson@gmail.com'}]}, + linkedschema: { i: { name:'Peter Sirka', email: 'petersirka@gmail.com' }, o: { name:'Peter Sirka', email: 'petersirka@gmail.com' } } }; - // Assemble body object var body = {}; for (var key in data) { body[key] = data[key].i; } - RESTBuilder.POST(url + '/schema/formatting/', body).exec(function (err, res) { + RESTBuilder.POST(url + '/schema/formatting/', body).exec(function (err, res, output) { + console.log(res, output); for (var key in data) Test.print('Schema formatting - ' + res[key], res[key] === data[key].o ? null : ' - ' + key + ' - INPUT=' + data[key].i + ' OUTPUT=' + res[key] + ' EXPECTING=' + data[key].o); resume(); }); - }); arr.push(function (resume) { @@ -245,9 +259,9 @@ ON('ready', function () { // var methods = [{ name: 'GET', validate: false }, { name: 'POST', validate: true }, { name: 'PUT', validate: true }, { name: 'PATCH', validate: true }, { name: 'DELETE', validate: true }]; // methods.wait(function(method, next) { // RESTBuilder[method.name](url + '/actions/methods/validation').exec(function(err, res) { - // if (method.validate) + // if (method.validate) // Test.print('Schema data validation - Should validate ' + method.name, err !== null && !res ? null : 'Should Validate'); - // else + // else // Test.print('Schema data validation - Should not validate ' + method.name, err === null && res ? null : 'Should not validate'); // next(); @@ -431,9 +445,9 @@ ON('ready', function () { // var methods = [{ name: 'GET', validate: false }, { name: 'POST', validate: true }, { name: 'PUT', validate: true }, { name: 'PATCH', validate: true }, { name: 'DELETE', validate: true }]; // methods.wait(function(method, next) { // RESTBuilder[method.name](url + '/actions/methods/validation').exec(function(err, res) { - // if (method.validate) + // if (method.validate) // Test.print('Schema data validation - Should validate ' + method.name, err !== null && !res ? null : 'Should Validate'); - // else + // else // Test.print('Schema data validation - Should not validate ' + method.name, err === null && res ? null : 'Should not validate'); // next(); diff --git a/tests/schemas/schemas/schema-formatting.js b/tests/schemas/schemas/schema-formatting.js index a367808..7c7a4cb 100644 --- a/tests/schemas/schemas/schema-formatting.js +++ b/tests/schemas/schemas/schema-formatting.js @@ -1,8 +1,10 @@ +NEWSCHEMA('Address', 'name:String,email:Email,address:String'); NEWSCHEMA('Formatting', function(schema) { schema.action('exec', { name: 'action with input data', - input: 'number:Number,number_float:Number,string:String,string_name:Name,string_capitalize:Capitalize,string_capitalize2:Capitalize2,string_lowercase:Lowercase,string_uppercase:Uppercase', + input: 'number:Number,number_float:Number,string:String,string_name:Name,string_capitalize:Capitalize,string_capitalize2:Capitalize2,string_lowercase:Lowercase,string_uppercase:Uppercase,datauri:DataURI,zip:ZIP,icon:Icon,color:Color,guid:GUID,tinyint:TinyInt,smallint:SmallInt,enums:{red|green|blue},inlineobject:{name:String,email:Email},arrayobj:[name:String,email:Email],linkedschema:@Address', action: function($, model) { + console.log(model); $.callback(model); } }); diff --git a/tests/schemas/schemas/schema-notrequired.js b/tests/schemas/schemas/schema-notrequired.js index bbdfe2b..284c928 100644 --- a/tests/schemas/schemas/schema-notrequired.js +++ b/tests/schemas/schemas/schema-notrequired.js @@ -1,7 +1,7 @@ NEWSCHEMA('Notrequired', function(schema) { schema.action('exec', { name: 'action with input data', - input: 'number:Number,email:Email,phone:Phone,boolean:Boolean,uid:UID,base64:Base64,url:URL,object:Object,date:Date,json:JSON', + input: 'number:Number,email:Email,phone:Phone,boolean:Boolean,uid:UID,base64:Base64,url:URL,object:Object,date:Date,json:JSON,datauri:DataURI,zip:ZIP,icon:Icon,color:Color,guid:GUID,tinyint:TinyInt,smallint:SmallInt,enums:{red|green|blue},inlineobject:{name:String,email:Email},arrayobj:[name:String,email:Email],linkedschema:@Address', action: function($, model) { console.log(model); $.success(model); diff --git a/tests/schemas/schemas/schema-required.js b/tests/schemas/schemas/schema-required.js index 3bfb49b..6000bfa 100644 --- a/tests/schemas/schemas/schema-required.js +++ b/tests/schemas/schemas/schema-required.js @@ -1,7 +1,7 @@ NEWSCHEMA('Required', function(schema) { schema.action('exec', { name: 'action with input data', - input: '*number:Number,*email:Email,*phone:Phone,*boolean:Boolean,*uid:UID,*base64:Base64,*url:URL,*object:Object,*date:Date,*json:JSON', + input: '*number:Number,*email:Email,*phone:Phone,*boolean:Boolean,*uid:UID,*base64:Base64,*url:URL,*object:Object,*date:Date,*json:JSON,*datauri:DataURI,*zip:ZIP,*icon:Icon,*color:Color,*guid:GUID,*tinyint:TinyInt,*smallint:SmallInt,*enums:{red|green|blue},*inlineobject:{name:String,email:Email},*arrayobj:[name:String,email:Email],*linkedschema:@Address', action: function($, model) { $.callback(model); } diff --git a/tests/staticfiles/definitions/merge.js b/tests/staticfiles/definitions/merge.js index 5119d89..2c2942d 100644 --- a/tests/staticfiles/definitions/merge.js +++ b/tests/staticfiles/definitions/merge.js @@ -1,5 +1,5 @@ MERGE('/merge1.js', '/file1.js', '/file2.js'); MERGE('/merge2.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', '/file3.js'); -// MERGE('/merge3.js', '/*.js'); @TODO: Merge from wildcard oes not work -MERGE('/merge4.js', '=/modern/file1.js', '=modern/file2.js'); -MERGE('/merge5.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', '=modern/file3.js'); \ No newline at end of file +// MERGE('/merge3.js', '/*.js'); @TODO: Merge from wildcard oes not work +MERGE('/merge1.css', '/style.css', '/style2.css'); +MERGE('/merge2.css', 'https://cdn.componentator.com/spa.min@19.css', '/style.css'); diff --git a/tests/staticfiles/index.js b/tests/staticfiles/index.js index 4fc60fe..e4ed630 100644 --- a/tests/staticfiles/index.js +++ b/tests/staticfiles/index.js @@ -42,14 +42,14 @@ ON('ready', function() { arr.push(function(resume) { RESTBuilder.GET(url + '/merge1.js').exec(function(err, response, output) { - Test.print('Merge - Two files', err === null && output.response !== null ? null : 'Expected ' + correct); + Test.print('Merge JS - Two files', err === null && output.response !== null ? null : 'Expected ' + correct); resume(); }); }); arr.push(function(resume) { RESTBuilder.GET(url + '/merge2.js').exec(function(err, response, output) { - Test.print('Merge - With Url', err === null && output.response !== null ? null : 'Expected ' + correct); + Test.print('Merge JS - With Url', err === null && output.response !== null ? null : 'Expected ' + correct); resume(); }); }); @@ -57,7 +57,28 @@ ON('ready', function() { // arr.push(function(next_fn) { // RESTBuilder.GET(url + '/merge3.js').exec(function(err, response, output) { - // Test.print('Merge - All', err === null && output.response !== null ? null : 'Expected ' + correct); + // Test.print('Merge JS - All', err === null && output.response !== null ? null : 'Expected ' + correct); + // next_fn(); + // }); + // }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/merge1.css').exec(function(err, response, output) { + Test.print('Merge CSS- Two files', err === null && output.response !== null ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + '/merge2.css').exec(function(err, response, output) { + Test.print('Merge CSS - With Url', err === null && output.response !== null ? null : 'Expected ' + correct); + resume(); + }); + }); + + // arr.push(function(next_fn) { + // RESTBuilder.GET(url + '/merge3.css').exec(function(err, response, output) { + // Test.print('Merge CSS - All', err === null && output.response !== null ? null : 'Expected ' + correct); // next_fn(); // }); // }); diff --git a/tests/staticfiles/public/css/style.css b/tests/staticfiles/public/css/style.css new file mode 100644 index 0000000..a9385cf --- /dev/null +++ b/tests/staticfiles/public/css/style.css @@ -0,0 +1,5 @@ +.circle { + width: 500px; + height: 500px; + border-radius: 100%; +} \ No newline at end of file diff --git a/tests/staticfiles/public/css/style2.css b/tests/staticfiles/public/css/style2.css new file mode 100644 index 0000000..a9385cf --- /dev/null +++ b/tests/staticfiles/public/css/style2.css @@ -0,0 +1,5 @@ +.circle { + width: 500px; + height: 500px; + border-radius: 100%; +} \ No newline at end of file diff --git a/tests/staticfiles/public/css/style3.css b/tests/staticfiles/public/css/style3.css new file mode 100644 index 0000000..a9385cf --- /dev/null +++ b/tests/staticfiles/public/css/style3.css @@ -0,0 +1,5 @@ +.circle { + width: 500px; + height: 500px; + border-radius: 100%; +} \ No newline at end of file diff --git a/tests/tms.zip b/tests/tms.zip new file mode 100644 index 0000000000000000000000000000000000000000..2d19cf5f6e8cc58ce5ade9e7e4047dbf5ed8e8d8 GIT binary patch literal 4671 zcmdT{XIN9&77aB~gn%Z36h#CSkOUQbfgq?M1VRWc7J5k-S}0;eBGLpALX)Bb6D)v~ zND~`nU@WNf7zPHcASw)^;s`h>k9SWXqYxwbUiil2RP^xH^|bNH7u0IK;nu#QRz)ve`*K<1S5{BvT@<6m;$vqFEX4piMAI5x)0B!wDT_$`UH zlA9n|9AU<7-s1Yg=Uvh0xtpV(a;!YZTF$53@NA6>$C_C;Cz{&+`l2dt#a+~#cgXF# zyUb*6;rmztR%Df~Rvi7bULU8VFKb;z!CpfrdP8H(`#TK_P6QyeqpNO>-8u2We?weh zAS>Kt|A}#32WSfu<2H>i;&n5eO!`|i8a{U z2dE%XGO=|V)P6h|QDO_5^wxqF1+n3MJBrzR=SpP>iLBDB(|WRk=x`K|B% zd1B+PD^a!A^mXY9m|IO%ChyiWIQG(%_no%WN+C;7;w$6H?9&t9KmT~lG< zV%oDIFeXmio_l0bp|&4I1s#Jf=V^2qYo+x!9>_YcM!B8LeAAf9I$1V+J-{#_)`VV6 zM4q?njV3Box-5vUSG0A;#^|XBxfO`z%$Q%a+3 z_bE`%Fd-$b%DAE&>K8fqc4Sy%qAO~mx_xU|dr1ExuYKKhze`K%Kgr;%H@xWF(spc< z66tQucD++f^uC8%Ft2%<@8jAxtvWTT+H{Io+$L+L92MPyYX_F@2UqAQVIe!VL2F zp5G$_`7QUHmiDD0WX*0cGgll89G4<1)cK-QD?%OPx#rZ+$8{6?s2n$C z-y~XDMCZ>fZ#jBK_m5q4Bbzp8>YQlW?6a;dqVh+~g}>Auylwrk%`qvMz{A`RyqdU& zv#!lMdpKmFq}7OQK0%X3@OeXEXh#jtt5=`TTVy(_vqP)FjV`~4;XUxBsnce-IK*74 zIgIs>k|3Qq4e5P*E|lL6dDdQkK|_`{9{PuAmmQtB_tnMGhQp4YM^Ro)2Q^sFscODG zs@Tpx>X&@p(EIwv=Pqwu`n#JOZ^Udy`=C3vRa5QLovw8R%P88^moEMoKz=Q*uB=_P zulkg9s#3}GH`eC5JBd3U8OZTQ&A8r~0UjSNArHuREPuS;OT}eNe+4a@@cCJhZEZ_P z*wHu6FL}FaxWi~;+NGp^%B}^g?_IE!d1mUpglQ7?hPzt1|7L5YEB5&MAw}Qy_*WH) zM(n4HI-69?HmY*Fu;ty#<87g*f;bDSA8tZZj-(IE%^Ne0!tBHy8Xr1I53=BV(WvZ- zG|+pHFu2ytx!z~f4VS@O+H=X2zs#6AQPwwrU<3~7;fy5rWl(tn zIun)wF(sjiUIHE3MN&;w=>5`PBC zqER6qhUSg@Lc!}>>gy(2;mpY^iMAcql!v4ia^+l{&fOML2k}0+rKOxDmHbCm`=0QU z?)p5-`UixwmL-~u-iFKimkse(HP;wfEz>I3w6@91ieIzQsC0wTa$EdzBQ*{0`?f_4 zS$^@`B5~mH4-jL(nnDs2$4LD9>k0G~{um^H2~;iq;r`pp$|R!Tx&rtAz~u|ZAln4` zI9(8Db$Nlag}Z)$IRl#@BR0uasEQc{78F{MT@YXc-T)iU8{8-aV~}kRVNdh^&ie&C z3b2}R6ABudU~t*Gkn;K9v$g!9&~Ot8UjUcQmH27_v-Y&`D8P`yT_G@}g281QLB|#> zV0QKtjte{`+@AnXDHvRK+Z66>9VQ$Z_#3#p03BX1xa@rCNyY-?*|;4zI&dg(XEAd_ zw?T#je2|bk1^sIxa>w0JV8uQI{&kmfWw2<058^{H3$ZmZ6-4bFDwb)(J0_yK;?(mP*C{= ggUh}z2qR3 Date: Tue, 9 Apr 2024 07:56:12 +0000 Subject: [PATCH 03/28] Added view tests --- helpers/index.js | 1 + tests/schemas/index.js | 2 - tests/tms/index.js | 1 + tests/views/controllers/default.js | 108 ++++++++++++++ tests/views/definitions/func.js | 8 + tests/views/index.js | 177 +++++++++++++++++++++++ tests/views/views/assignment.html | 3 + tests/views/views/conditions.html | 24 +++ tests/views/views/escaping.html | 5 + tests/views/views/helpers.html | 6 + tests/views/views/index.html | 2 + tests/views/views/layout-custom.html | 0 tests/views/views/layout.html | 16 ++ tests/views/views/looping-array.html | 13 ++ tests/views/views/looping-object.html | 13 ++ tests/views/views/looping.html | 0 tests/views/views/model.html | 2 + tests/views/views/model2.html | 6 + tests/views/views/nested/index.html | 2 + tests/views/views/partials/index.html | 0 tests/views/views/partials/products.html | 0 tests/views/views/partials/users.html | 1 + tests/views/views/repository.html | 2 + tests/views/views/sections-layout.html | 4 + tests/views/views/sections.html | 6 + tests/views/views/view-multiline.html | 3 + tests/views/views/view.html | 1 + 27 files changed, 404 insertions(+), 2 deletions(-) create mode 100644 tests/views/controllers/default.js create mode 100644 tests/views/definitions/func.js create mode 100644 tests/views/index.js create mode 100644 tests/views/views/assignment.html create mode 100644 tests/views/views/conditions.html create mode 100644 tests/views/views/escaping.html create mode 100644 tests/views/views/helpers.html create mode 100644 tests/views/views/index.html create mode 100644 tests/views/views/layout-custom.html create mode 100644 tests/views/views/layout.html create mode 100644 tests/views/views/looping-array.html create mode 100644 tests/views/views/looping-object.html create mode 100644 tests/views/views/looping.html create mode 100644 tests/views/views/model.html create mode 100644 tests/views/views/model2.html create mode 100644 tests/views/views/nested/index.html create mode 100644 tests/views/views/partials/index.html create mode 100644 tests/views/views/partials/products.html create mode 100644 tests/views/views/partials/users.html create mode 100644 tests/views/views/repository.html create mode 100644 tests/views/views/sections-layout.html create mode 100644 tests/views/views/sections.html create mode 100644 tests/views/views/view-multiline.html create mode 100644 tests/views/views/view.html diff --git a/helpers/index.js b/helpers/index.js index 0372768..f7a1e38 100644 --- a/helpers/index.js +++ b/helpers/index.js @@ -18,6 +18,7 @@ const options = {}; // options.livereload = 'https://yourhostname'; // options.watcher = true; // enables watcher for the release mode only controlled by the app `F.restart()` // options.edit = 'wss://www.yourcodeinstance.com/?id=projectname' + options.release = process.argv.includes('--release'); // Service mode: diff --git a/tests/schemas/index.js b/tests/schemas/index.js index 324320f..e3aeac8 100644 --- a/tests/schemas/index.js +++ b/tests/schemas/index.js @@ -145,9 +145,7 @@ ON('ready', function () { }); arr.push(function (resume) { - prefill_undefined(valid); - valid.wait(function (item, func) { RESTBuilder.POST(url + '/schema/required/', item).exec(function (err) { var items = []; diff --git a/tests/tms/index.js b/tests/tms/index.js index d89d0f4..ad79e94 100644 --- a/tests/tms/index.js +++ b/tests/tms/index.js @@ -17,6 +17,7 @@ ON('ready', function() { }); next(); }); + Test.push('TMS - ', function(next) { MAIN.client1 && MAIN.client1.publish('users_create', { name: 'Peter Sirka', email: 'petersirka@gmail.com' }); next(); diff --git a/tests/views/controllers/default.js b/tests/views/controllers/default.js new file mode 100644 index 0000000..ad14c3b --- /dev/null +++ b/tests/views/controllers/default.js @@ -0,0 +1,108 @@ +exports.install = function() { + ROUTE('GET /view/basic/', basic_page); + ROUTE('GET /view/common/', common_page); +}; + +function basic_page($) { + var view; + var cmd = $.query.cmd || 'basic'; + var model = {}; + + switch (cmd) { + case 'basic': + view = 'index'; + break; + case 'nested': + view = 'nested/index'; + break; + case 'layout': + view = 'index'; + break; + case 'partial': + view = 'index'; + break; + case 'layout-custom': + $.layout('layout-custom'); + view = 'index'; + break; + case 'repository': + view = 'repository'; + $.view(view).repository.name = 'Peter Sirka'; + return; + break; + case 'model': + model.name = 'Louis Bertson'; + view = 'model'; + break; + case 'view': + view = 'view'; + break; + case 'view-multiline': + view = 'view-multiline'; + break; + + } + + if (model) + $.view(view, model); + else + $.view(view); +} + + + +function common_page($) { + var view; + var cmd = $.query.cmd || 'common'; + var model = {}; + + switch (cmd) { + case 'escaping': + view = 'escaping'; + break; + case 'conditions': + view = 'conditions'; + break; + case 'looping-array': + view = 'looping-array'; + break; + case 'looping-object': + view = 'looping-object'; + break; + case 'assignment': + view = 'assignment'; + break; + case 'helpers': + view = 'helpers'; + break; + case 'sections': + $.layout('sections-layout'); + view = 'sections'; + break; + case 'layout-custom': + $.layout('layout-custom'); + view = 'index'; + break; + case 'repository': + view = 'repository'; + $.view(view).repository.name = 'Peter Sirka'; + return; + break; + case 'model': + model.name = 'Louis Bertson'; + view = 'model'; + break; + case 'view': + view = 'view'; + break; + case 'view-multiline': + view = 'view-multiline'; + break; + + } + + if (model) + $.view(view, model); + else + $.view(view); +} diff --git a/tests/views/definitions/func.js b/tests/views/definitions/func.js new file mode 100644 index 0000000..548acfd --- /dev/null +++ b/tests/views/definitions/func.js @@ -0,0 +1,8 @@ +DEF.helpers.custom = function(str, num) { + // this === controller + return str + ' = ' + num; +}; + +DEF.helpers.isTrue = function(value) { + return value ? true : false; +}; diff --git a/tests/views/index.js b/tests/views/index.js new file mode 100644 index 0000000..936e712 --- /dev/null +++ b/tests/views/index.js @@ -0,0 +1,177 @@ +require('../../index'); +require('../../test'); + +F.run({ port: 8000, release: false }); + +var url = 'http://localhost:8000'; +ON('ready', function() { + + var input,response,correct; + Test.push('Views - Basic test', function(next) { + var arr = []; + + arr.push(function(resume) { + input = url + '/view/basic'; + correct = '

Hello world!

'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Without layout', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=layout'; + correct = '

Hello world!

'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('With layout', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=layout-custom'; + correct = '

Hello world!

'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('With layout - Custom', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=nested'; + correct = '

Hello world!

'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Nested View', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=repository'; + correct = 'Name: Peter Sirka'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Repository - basic', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=model'; + correct = 'Name: Louis Bertson'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Model - model object', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=view'; + correct = 'Name: Peter Sirka'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Model - view(name, model))', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/basic?cmd=view-multiline'; + correct = '
  • A
  • B
  • C
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Model - view(name, model)) multi-line', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + arr.async(next); + }); + + Test.push('Views - Common', function(next) { + var arr = []; + // arr.push(function(resume) { + // input = url + '/view/common?cmd=escaping'; + // correct = '
  • A
  • B
  • C
'; + // RESTBuilder.GET(input).exec(function(err, res, output) { + // response = output.response; + // console.log(response); + // Test.print('Escaping', err == null && response == correct ? null : 'Expected ' + correct); + // resume(); + // }); + // }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=conditions'; + correct = '
sign up




Here is
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Conditions', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=looping-array'; + correct = '
1, index: 0
2, index: 1
3, index: 2
4, index: 3


'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Looping - array', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=looping-object'; + correct = '
property: name, value: Peter
property: age, value: 32


'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Looping - Object', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=sections'; + correct = '

Homepage


THIS IS FOOTER FROM THE VIEW
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Sections', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + // arr.push(function(resume) { + // input = url + '/view/common?cmd=assignment'; + // correct = '

Homepage


THIS IS FOOTER FROM THE VIEW
'; + // RESTBuilder.GET(input).exec(function(err, res, output) { + // response = output.response; + // Test.print('Assignment', err == null && response == correct ? null : 'Expected ' + correct); + // resume(); + // }); + // }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=helpers'; + correct = '

Homepage


THIS IS FOOTER FROM THE VIEW
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + console.log(response); + Test.print('Assignment', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.async(next); + }); + + setTimeout(function() { + Test.run(function() { + console.log('DONE'); + }); + }, 2000); +}); \ No newline at end of file diff --git a/tests/views/views/assignment.html b/tests/views/views/assignment.html new file mode 100644 index 0000000..0e48fa7 --- /dev/null +++ b/tests/views/views/assignment.html @@ -0,0 +1,3 @@ +@{layout('')} +@{repository.name = 'Peter'} +

@{repository.name}

\ No newline at end of file diff --git a/tests/views/views/conditions.html b/tests/views/views/conditions.html new file mode 100644 index 0000000..a947f57 --- /dev/null +++ b/tests/views/views/conditions.html @@ -0,0 +1,24 @@ +@{layout('')} +@{if user === null} +
sign in
+@{else} +
sign up
+@{fi} + +
+
+ +@{if model.name === 'Peter'} + @{if model.name === 'Lucia'} +
Here is Lucia.
+ @{else} +
Here is Peter.
+ @{fi} +@{fi} + +
+
+ +@{if model.name !== 'Peter'} +
Here is @{model.name}
+@{fi} \ No newline at end of file diff --git a/tests/views/views/escaping.html b/tests/views/views/escaping.html new file mode 100644 index 0000000..176d33e --- /dev/null +++ b/tests/views/views/escaping.html @@ -0,0 +1,5 @@ +@{layout('')} +@{repository.tag = 'Hello World'} + +
ESCAPED: @{repository.tag}
+
RAW: @{!repository.tag}
\ No newline at end of file diff --git a/tests/views/views/helpers.html b/tests/views/views/helpers.html new file mode 100644 index 0000000..5f40f63 --- /dev/null +++ b/tests/views/views/helpers.html @@ -0,0 +1,6 @@ +@{layout('')} +@{custom('Peter', 25)} +@{helpers.custom('Peter', 25)} +@{if helpers.isTrue(true)} + Helpers in condition. The helper isTrue won't work without helpers keyword. +@{fi} \ No newline at end of file diff --git a/tests/views/views/index.html b/tests/views/views/index.html new file mode 100644 index 0000000..467d3b3 --- /dev/null +++ b/tests/views/views/index.html @@ -0,0 +1,2 @@ +@{layout('')} +

Hello world!

diff --git a/tests/views/views/layout-custom.html b/tests/views/views/layout-custom.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/views/views/layout.html b/tests/views/views/layout.html new file mode 100644 index 0000000..6161c7f --- /dev/null +++ b/tests/views/views/layout.html @@ -0,0 +1,16 @@ + + + + + + + + + + + @{body} + + + \ No newline at end of file diff --git a/tests/views/views/looping-array.html b/tests/views/views/looping-array.html new file mode 100644 index 0000000..6182900 --- /dev/null +++ b/tests/views/views/looping-array.html @@ -0,0 +1,13 @@ +@{layout('')} +@{foreach m in [1, 2, 3, 4]} +
@{m}, index: @{index}
+@{end} + +
+
+ +@{foreach property in model} +
@{index}
+
@{property.name}
+
@{property.age.format('### ###')}
+@{end} \ No newline at end of file diff --git a/tests/views/views/looping-object.html b/tests/views/views/looping-object.html new file mode 100644 index 0000000..224fc9e --- /dev/null +++ b/tests/views/views/looping-object.html @@ -0,0 +1,13 @@ +@{layout('')} +@{foreach m in { name: 'Peter', age: 32 }} +
property: @{m.key}, value: @{m.value}
+@{end} + +
+
+ +@{foreach property in model} +
@{index}
+
@{property.key}
+
@{property.value}
+@{end} \ No newline at end of file diff --git a/tests/views/views/looping.html b/tests/views/views/looping.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/views/views/model.html b/tests/views/views/model.html new file mode 100644 index 0000000..e46ae8d --- /dev/null +++ b/tests/views/views/model.html @@ -0,0 +1,2 @@ +@{layout('')} +Name: @{model.name} \ No newline at end of file diff --git a/tests/views/views/model2.html b/tests/views/views/model2.html new file mode 100644 index 0000000..12c96fa --- /dev/null +++ b/tests/views/views/model2.html @@ -0,0 +1,6 @@ +@{layout('')} +
    + @{ foreach m in model} +
  • @{m.name}
  • + @{end} +
\ No newline at end of file diff --git a/tests/views/views/nested/index.html b/tests/views/views/nested/index.html new file mode 100644 index 0000000..445a3f0 --- /dev/null +++ b/tests/views/views/nested/index.html @@ -0,0 +1,2 @@ +@{layout('')} +

Hello world!

\ No newline at end of file diff --git a/tests/views/views/partials/index.html b/tests/views/views/partials/index.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/views/views/partials/products.html b/tests/views/views/partials/products.html new file mode 100644 index 0000000..e69de29 diff --git a/tests/views/views/partials/users.html b/tests/views/views/partials/users.html new file mode 100644 index 0000000..464df50 --- /dev/null +++ b/tests/views/views/partials/users.html @@ -0,0 +1 @@ +Name: @{model.name} \ No newline at end of file diff --git a/tests/views/views/repository.html b/tests/views/views/repository.html new file mode 100644 index 0000000..8cef6b3 --- /dev/null +++ b/tests/views/views/repository.html @@ -0,0 +1,2 @@ +@{layout('')} +Name: @{repository.name} \ No newline at end of file diff --git a/tests/views/views/sections-layout.html b/tests/views/views/sections-layout.html new file mode 100644 index 0000000..21ad49b --- /dev/null +++ b/tests/views/views/sections-layout.html @@ -0,0 +1,4 @@ + + @{body} + @{section('footer')} + \ No newline at end of file diff --git a/tests/views/views/sections.html b/tests/views/views/sections.html new file mode 100644 index 0000000..070742c --- /dev/null +++ b/tests/views/views/sections.html @@ -0,0 +1,6 @@ +@{section footer} +
THIS IS FOOTER FROM THE VIEW
+@{end} + +

Homepage

+
\ No newline at end of file diff --git a/tests/views/views/view-multiline.html b/tests/views/views/view-multiline.html new file mode 100644 index 0000000..ade6989 --- /dev/null +++ b/tests/views/views/view-multiline.html @@ -0,0 +1,3 @@ +@{view('model2', [{ name: 'A', price: 23.32 }, + { name: 'B', price: 32.10 }, + { name: 'C', price: 15.22 }])} diff --git a/tests/views/views/view.html b/tests/views/views/view.html new file mode 100644 index 0000000..619b044 --- /dev/null +++ b/tests/views/views/view.html @@ -0,0 +1 @@ +@{view('model', { name: 'Peter Sirka' })} \ No newline at end of file From 32a66d8254811c1d321dc1760be72a1894bd04d8 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Fri, 12 Apr 2024 02:59:48 +0000 Subject: [PATCH 04/28] Added test for views --- tests/views/config | 1 + tests/views/controllers/default.js | 10 ++++-- tests/views/definitions/func.js | 8 ----- tests/views/index.js | 54 +++++++++++++++++------------ tests/views/public/img/logo.png | Bin 0 -> 2657 bytes tests/views/public/js/ui.js | 3 ++ tests/views/views/binding.html | 2 ++ tests/views/views/config.html | 3 ++ tests/views/views/static.html | 6 ++++ 9 files changed, 54 insertions(+), 33 deletions(-) create mode 100644 tests/views/config delete mode 100644 tests/views/definitions/func.js create mode 100644 tests/views/public/img/logo.png create mode 100644 tests/views/public/js/ui.js create mode 100644 tests/views/views/binding.html create mode 100644 tests/views/views/config.html create mode 100644 tests/views/views/static.html diff --git a/tests/views/config b/tests/views/config new file mode 100644 index 0000000..f487a5e --- /dev/null +++ b/tests/views/config @@ -0,0 +1 @@ +manager-url : postgresql://user:password@localhost:5432/database \ No newline at end of file diff --git a/tests/views/controllers/default.js b/tests/views/controllers/default.js index ad14c3b..2ab84ae 100644 --- a/tests/views/controllers/default.js +++ b/tests/views/controllers/default.js @@ -69,11 +69,17 @@ function common_page($) { case 'looping-object': view = 'looping-object'; break; + case 'static': + view = 'static'; + break; case 'assignment': view = 'assignment'; break; - case 'helpers': - view = 'helpers'; + case 'config': + view = 'config'; + break; + case 'text': + view = 'text'; break; case 'sections': $.layout('sections-layout'); diff --git a/tests/views/definitions/func.js b/tests/views/definitions/func.js deleted file mode 100644 index 548acfd..0000000 --- a/tests/views/definitions/func.js +++ /dev/null @@ -1,8 +0,0 @@ -DEF.helpers.custom = function(str, num) { - // this === controller - return str + ' = ' + num; -}; - -DEF.helpers.isTrue = function(value) { - return value ? true : false; -}; diff --git a/tests/views/index.js b/tests/views/index.js index 936e712..0f697c1 100644 --- a/tests/views/index.js +++ b/tests/views/index.js @@ -94,16 +94,15 @@ ON('ready', function() { Test.push('Views - Common', function(next) { var arr = []; - // arr.push(function(resume) { - // input = url + '/view/common?cmd=escaping'; - // correct = '
  • A
  • B
  • C
'; - // RESTBuilder.GET(input).exec(function(err, res, output) { - // response = output.response; - // console.log(response); - // Test.print('Escaping', err == null && response == correct ? null : 'Expected ' + correct); - // resume(); - // }); - // }); + arr.push(function(resume) { + input = url + '/view/common?cmd=escaping'; + correct = '
ESCAPED: Hello <b>World</b>
RAW: Hello World
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Escaping', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); arr.push(function(resume) { input = url + '/view/common?cmd=conditions'; @@ -145,27 +144,36 @@ ON('ready', function() { }); }); - // arr.push(function(resume) { - // input = url + '/view/common?cmd=assignment'; - // correct = '

Homepage


THIS IS FOOTER FROM THE VIEW
'; - // RESTBuilder.GET(input).exec(function(err, res, output) { - // response = output.response; - // Test.print('Assignment', err == null && response == correct ? null : 'Expected ' + correct); - // resume(); - // }); - // }); - arr.push(function(resume) { - input = url + '/view/common?cmd=helpers'; - correct = '

Homepage


THIS IS FOOTER FROM THE VIEW
'; + input = url + '/view/common?cmd=assignment'; + correct = '

Peter

'; RESTBuilder.GET(input).exec(function(err, res, output) { response = output.response; - console.log(response); Test.print('Assignment', err == null && response == correct ? null : 'Expected ' + correct); resume(); }); }); + arr.push(function(resume) { + input = url + '/view/common?cmd=config'; + correct = '
CONF.name: Total.js
CONF[\'manager-url\']: postgresql://user:password@localhost:5432/database
'; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Config', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + + arr.push(function(resume) { + input = url + '/view/common?cmd=static'; + correct = ''; + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Config', err == null && response == correct ? null : 'Expected ' + correct); + resume(); + }); + }); + arr.async(next); }); diff --git a/tests/views/public/img/logo.png b/tests/views/public/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..df20a145d6e73e97a4e57fd6f36ad6b139be00e5 GIT binary patch literal 2657 zcmV-n3ZC_eP)iUj0002DP)t-s|NsAH zwmF;GTw<^|VX8Hi*HHQW^{&;Ozvh}{vpZU`BVe>HT%|Ji`}lyzNtxJLbiP4fq&0%V zWQ@*HRj?Y~?$+=3>*Mj>G#~A&xw%LL$cz9 z;q%Xm#cY_&exlrJ!r`>c=fHcvNKdW-yx*&m%6Cqv7@*a5+VRA>N|h>A zDqn8jaeTe(U%^Gg#>tG_C$N=U0i)-X{ks_C?%u#J7KCGmj}~ig!#2`TkZfc1NI32~CBhQsyamHY z!O@31BQ?U3LuWaBh%AaSOEwCU;f>^<3Hqbk=@@4Y7&QE{e{H7B?SKp=#!&_`XPseB zAx1gkEM$!}e@E`h1;>yw>*%9B<{21^Rk=e)|9DaBom!;4 zFbc{#%QBA%rk`pZs+PtFCc^PbJ0@_ODuimJXHM3{IE_+RCdido8;u`Lw47cSjxv3n zolqjhFf~3fQPvq0x?nS>pY^)>qxO-8lQ+={r@*1(?=KN{6s&QDQJxKNTg>{?pL|`T zL@*mo;}~d2c5f{nC(10hD2PVmI&6>t5T14BO<4bh5>IG6XSAbivBw1d{x!uGBk2oAo_pzDfcc39_#LQ^1fDz<7oc_HG%d$ojOB2OfkNt33Z(@^V zsx{9oO~^vvM}{(DWHCP}Y(X%V))EX8nZro4r}71<*180mFdSve!ZIhE#S*ew!UHW@ zd@@XGQIOHHsIZ%$5d@=vkRE3GMH^%nYeddy5loN%fMBB1!$7s0pb>?`a2BM1~PvcRZNYqievvnU#a`p}aRM%^R=P0S*#Kp3l)2(;tFfni5td*fLy%*C4X zlm=`sT&>ruFv#g!#uiA_M5b+9xw?fbufW$xD9ZD!eH@i4J9om46J&r$jfg*n#v!$4$B z$AW39f877~O=rovCJ+IGtZAqIt^P%FIBX6XV@=4^9R0_3QujP?Mqmwk#ul*P2!Uy1 zt%0wEN2zYekV8elKp6eQo%FxW=A_RV_NZyZtN@TT7RDO#2QB4*iKhU}s3ErINe?N# z5d#A|cx%4MALTFTXavFFXJ@reZq3u$lK|#uP5Oyc{e}El?vBbDQCk3H4JOVYg*96l zoKdX~E^(@m!kS?q1I*Ey^a<^i+!}vC6KCRJGDgiOaczZ8l{v+2o3j!pu{EY7F!88K z{}XJIS|bZgY)$$L1Nb$4G#LDvMumIA#j`XpDt-zewniG5%r(uPY}7~t6I+8zoUddh z6%xVVcbqEW{#hcJc*luJoL@v!fJ`tMiL*{r#3vDqia!j1v+1M3WK02M+h?g@6ga^4dEG$JTO^nvrn>GacN*Oj+<1H z7d2ABps5Tu{9g!5ccp>JFa}NtA0`V-))~OVZJRR^CM4XNNpsYcWeoXIlPkp`V8-fS zg=7g6$)PF`D&wqKC7hQdt*G8<6#o`Lt-p|e`9}BdOcV_M)tOo+otL91qZ%@zV6u!M z+x;V%AzkH(px1zHRB?iV*%Lo%E5!@ij3p+7#3N=!*Wao5I)G>+L--tjOI@QO1P1Le zF-PX=jBM?%uNU-{TEc2)aK?NRJ;VuFDjbE>&M4S~Np>jXH`pqJMZje3FbNW-z8%nx zd~q;GW70)n%#fnro_Lsc#^Y*#-}(5+&(lJz$m&_8*6OzYgc%C}vytngfCB59Q7Le@ z+x?^A3Y*=vm!l3?3=Fp5yyHbI-B#;;k=B!yp#5p_Fjzro#W0#Su7$T1^rkanoWjb1 zLEoI5zXuuz*X7z#X35!auV@(S=*#hYpz+|R*@{ck{!|VaxaqcjU}|G!5Uw2GcUB|T zBv~SirJaN9^yw*3yjYx2iiC-bNy3Qu`n)h0^pRG#d+|lcH^IfhY!ahi(D%*7h1uZ- z=8>Jb%*!=#{Tk?DOeUDiN17trHPFK_eL@dmEBP_7AQ<{j=$|Ik?LZ6sP+a7 z%?()EPQa@m6J^YTzAq5NpgH$x5ZiWwsq@VImDZZNmYkMFwQLHQ8iwxa8Uo#PX%OZN zW4op%WqYH;^|UOc&zZv9HF!_c6bQ9yY6%W9!((c0bkxU7ofrohBR0hVu*=o{*d_09 zW*x+i7+~~rH$k7?wgAQ%v$S!a{n_;W)6`7=wFrs*9|p(bFjoVTOteVOy-?}-hz`EO$k zkk(L$w^I7g^EalrE9%_IO{`f-V|c*Wg92^^ILp6|wN1hp4k(6F(0vVO^%FhMVKVvW zMgg{<%#x+~Io9BY8SeL?OSkWl-WJwSE)1!*9fZU{vPidh<`U&g%^Z z@QTPRS<*lL_s!)s8R{=z{xx*|UxW8rUSohgkmQ!#exo+d$6|Y{^6#HJ$?S*kWA;w7 z29V@tz?1ah-|vhx!0t(NXX9DsmaWTQ6k)QVAh{uZ-2zZyW z@AqkYQr*)`A~&>CW6iJ|kA{NeFMb#Oa=)~!INcWf1JIN8)_DTy+u$dO0x*zr8Ah)D zD8h-Q41`_5Se%?~xa%!;;a28l7`aTh@4Js3V3jIWs#K{`rAn15{ZsURfvEWLDnxXX P00000NkvXXu0mjf9%M45 literal 0 HcmV?d00001 diff --git a/tests/views/public/js/ui.js b/tests/views/public/js/ui.js new file mode 100644 index 0000000..a092d0f --- /dev/null +++ b/tests/views/public/js/ui.js @@ -0,0 +1,3 @@ +function ui() { + console.log('Total.js UI Components'); +} \ No newline at end of file diff --git a/tests/views/views/binding.html b/tests/views/views/binding.html new file mode 100644 index 0000000..a60177b --- /dev/null +++ b/tests/views/views/binding.html @@ -0,0 +1,2 @@ +Email: @{text('Email')} +Name: @{text('Name')} \ No newline at end of file diff --git a/tests/views/views/config.html b/tests/views/views/config.html new file mode 100644 index 0000000..af4310a --- /dev/null +++ b/tests/views/views/config.html @@ -0,0 +1,3 @@ +@{layout('')} +
CONF.name: @{'%name'}
+
CONF['manager-url']: @{'%manager-url'}
\ No newline at end of file diff --git a/tests/views/views/static.html b/tests/views/views/static.html new file mode 100644 index 0000000..f64efc2 --- /dev/null +++ b/tests/views/views/static.html @@ -0,0 +1,6 @@ +@{layout('')} + +@{import('ui.js')} + + +@{import('ui.css')} From 11b870c0eb4419ba10d1feff8a10140263530c35 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Sat, 13 Apr 2024 21:22:09 +0000 Subject: [PATCH 05/28] Clear code --- tests/views/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/views/index.js b/tests/views/index.js index 0f697c1..4d715d2 100644 --- a/tests/views/index.js +++ b/tests/views/index.js @@ -169,7 +169,7 @@ ON('ready', function() { correct = ''; RESTBuilder.GET(input).exec(function(err, res, output) { response = output.response; - Test.print('Config', err == null && response == correct ? null : 'Expected ' + correct); + Test.print('Static ', err == null && response == correct ? null : 'Expected ' + correct); resume(); }); }); From b482acaaff8f66e4207c71a4fdbba2f8e66c56bc Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Mon, 15 Apr 2024 10:24:28 +0000 Subject: [PATCH 06/28] Added Test for download fs --- tests/filestorage/controllers/default.js | 2 +- tests/filestorage/controllers/download.js | 6 +- .../IhP5Dr1eP61f.file} | 2 +- .../IhP0101d960f.file} | 2 +- .../IhOzP81cV61f.file} | 2 +- .../IhOzCy1e561f.file} | 2 +- .../IhOzP91eV61f.file} | 2 +- .../databases/fs-files/2479/IhOzrw1do60f.file | 21 +++++++ .../IhP5Dr1cP61f.file} | 2 +- .../databases/fs-files/3505/IgOH6d1cQ61f.file | 21 ------- .../databases/fs-files/3667/IhP5Dr1fP60f.file | 21 +++++++ .../databases/fs-files/3908/IhP0101e961f.file | 21 +++++++ .../IhOzCy1c561f.file} | 2 +- .../databases/fs-files/4228/IgOH6e1eQ61f.file | 21 ------- .../databases/fs-files/4588/IhOzCy1f560f.file | 21 +++++++ .../databases/fs-files/4830/IhOzP91fV60f.file | 21 +++++++ .../databases/fs-files/5700/IgOGpZ1cY61f.file | 21 ------- .../databases/fs-files/6031/IhOzrw1eo61f.file | 21 +++++++ .../databases/fs-files/6625/IhP5Dr1dP60f.file | 21 +++++++ .../IhP0101c961f.file} | 2 +- .../databases/fs-files/7398/IhP0101f960f.file | 21 +++++++ .../databases/fs-files/7546/IhOzCy1d560f.file | 21 +++++++ .../databases/fs-files/7723/IgOGPf1cn61f.file | 21 ------- .../databases/fs-files/7755/IgO9LF1cd61f.file | 63 ------------------- .../databases/fs-files/7788/IhOzP91dV60f.file | 21 +++++++ .../databases/fs-files/8306/IgO9HZ1dg60f.file | 21 ------- .../databases/fs-files/8624/IgO6Vy1cU61f.file | 63 ------------------- .../databases/fs-files/8989/IhOzrw1co61f.file | 63 +++++++++++++++++++ .../databases/fs-files/9521/IhOzrw1fo60f.file | 21 +++++++ .../filestorage/databases/fs-files/files.log | 35 ++++++----- tests/filestorage/index.js | 27 +++++--- tests/filestorage/tmp/upload_1.bin | 0 32 files changed, 343 insertions(+), 268 deletions(-) rename tests/filestorage/databases/fs-files/{0365/IgOGpa1dY60f.file => 0177/IhP5Dr1eP61f.file} (97%) rename tests/filestorage/databases/fs-files/{0676/IgOH6e1dQ60f.file => 0356/IhP0101d960f.file} (97%) rename tests/filestorage/databases/fs-files/{2473/IgO6Ql1c461f.file => 0617/IhOzP81cV61f.file} (99%) rename tests/filestorage/databases/fs-files/{1213/IgOGPf1dn60f.file => 1098/IhOzCy1e561f.file} (97%) rename tests/filestorage/databases/fs-files/{1245/IgO9LF1dd60f.file => 1340/IhOzP91eV61f.file} (97%) create mode 100644 tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file rename tests/filestorage/databases/fs-files/{4816/IgO9HZ1cg61f.file => 3135/IhP5Dr1cP61f.file} (99%) delete mode 100644 tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file create mode 100644 tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file create mode 100644 tests/filestorage/databases/fs-files/3908/IhP0101e961f.file rename tests/filestorage/databases/fs-files/{6102/IgO5QN1cH61f.file => 4056/IhOzCy1c561f.file} (99%) delete mode 100644 tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file create mode 100644 tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file create mode 100644 tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file delete mode 100644 tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file create mode 100644 tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file create mode 100644 tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file rename tests/filestorage/databases/fs-files/{6125/IgO9Dd1cX61f.file => 6866/IhP0101c961f.file} (99%) create mode 100644 tests/filestorage/databases/fs-files/7398/IhP0101f960f.file create mode 100644 tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file delete mode 100644 tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file delete mode 100644 tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file create mode 100644 tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file delete mode 100644 tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file delete mode 100644 tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file create mode 100644 tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file create mode 100644 tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file delete mode 100644 tests/filestorage/tmp/upload_1.bin diff --git a/tests/filestorage/controllers/default.js b/tests/filestorage/controllers/default.js index c7dd474..376c939 100644 --- a/tests/filestorage/controllers/default.js +++ b/tests/filestorage/controllers/default.js @@ -30,7 +30,7 @@ function upload($) { }, function() { // Returns JSON with list of uploaded and stored files - $.json(output.length > 1 ? output : output[0]); + $.json(output.length > 1 ? output : output[0]); }); } \ No newline at end of file diff --git a/tests/filestorage/controllers/download.js b/tests/filestorage/controllers/download.js index 5a50df7..6ae06b8 100644 --- a/tests/filestorage/controllers/download.js +++ b/tests/filestorage/controllers/download.js @@ -2,8 +2,8 @@ exports.install = function() { ROUTE('FILE /downloads/*.*', download); }; -function download(req, res) { - var filename = req.split[1]; +function download($) { + var filename = $.split[1]; var id = filename.substring(0, filename.lastIndexOf('.')); - res.filefs(CONF.fs, id); + $.filefs(CONF.fs, id); } \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file b/tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file similarity index 97% rename from tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file rename to tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file index c2cacdd..709482d 100644 --- a/tests/filestorage/databases/fs-files/0365/IgOGpa1dY60f.file +++ b/tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file @@ -1,4 +1,4 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.211Z"} The MIT License +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.350Z"} The MIT License Copyright 2024 (c) Total.js Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file b/tests/filestorage/databases/fs-files/0356/IhP0101d960f.file similarity index 97% rename from tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file rename to tests/filestorage/databases/fs-files/0356/IhP0101d960f.file index f381bbc..720c9db 100644 --- a/tests/filestorage/databases/fs-files/0676/IgOH6e1dQ60f.file +++ b/tests/filestorage/databases/fs-files/0356/IhP0101d960f.file @@ -1,4 +1,4 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.019Z"} The MIT License +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.692Z"} The MIT License Copyright 2024 (c) Total.js Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file b/tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file similarity index 99% rename from tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file rename to tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file index 021112c..6621240 100644 --- a/tests/filestorage/databases/fs-files/2473/IgO6Ql1c461f.file +++ b/tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file @@ -1,4 +1,4 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:02:48.365Z"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:22:13.886Z"} diff --git a/tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file b/tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file similarity index 97% rename from tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file rename to tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file index ddbe116..89c7774 100644 --- a/tests/filestorage/databases/fs-files/1213/IgOGPf1dn60f.file +++ b/tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file @@ -1,4 +1,4 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.599Z"} The MIT License +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.442Z"} The MIT License Copyright 2024 (c) Total.js Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file b/tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file similarity index 97% rename from tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file rename to tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file index 7ffe93b..e9a1059 100644 --- a/tests/filestorage/databases/fs-files/1245/IgO9LF1dd60f.file +++ b/tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file @@ -1,4 +1,4 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:27.319Z"} The MIT License +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.964Z"} The MIT License Copyright 2024 (c) Total.js Permission is hereby granted, free of charge, to any person obtaining a diff --git a/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file b/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file new file mode 100644 index 0000000..a89cf34 --- /dev/null +++ b/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.424Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file b/tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file similarity index 99% rename from tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file rename to tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file index 56d11f9..437ac08 100644 --- a/tests/filestorage/databases/fs-files/4816/IgO9HZ1cg61f.file +++ b/tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file @@ -1,4 +1,4 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:04.511Z"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:59:30.340Z"} diff --git a/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file b/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file deleted file mode 100644 index c962763..0000000 --- a/tests/filestorage/databases/fs-files/3505/IgOH6d1cQ61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.009Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file b/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file new file mode 100644 index 0000000..4c393be --- /dev/null +++ b/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.353Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file b/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file new file mode 100644 index 0000000..2bcffb5 --- /dev/null +++ b/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.697Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file b/tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file similarity index 99% rename from tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file rename to tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file index c907e78..af3fca6 100644 --- a/tests/filestorage/databases/fs-files/6102/IgO5QN1cH61f.file +++ b/tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file @@ -1,4 +1,4 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T00:56:21.574Z"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:20:58.426Z"} diff --git a/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file b/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file deleted file mode 100644 index 034cc3a..0000000 --- a/tests/filestorage/databases/fs-files/4228/IgOH6e1eQ61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.022Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file b/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file new file mode 100644 index 0000000..40594ff --- /dev/null +++ b/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.448Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file b/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file new file mode 100644 index 0000000..4427d90 --- /dev/null +++ b/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.978Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file b/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file deleted file mode 100644 index c4303a4..0000000 --- a/tests/filestorage/databases/fs-files/5700/IgOGpZ1cY61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.200Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file b/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file new file mode 100644 index 0000000..89a8379 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.427Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file b/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file new file mode 100644 index 0000000..2cb4806 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.347Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file b/tests/filestorage/databases/fs-files/6866/IhP0101c961f.file similarity index 99% rename from tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file rename to tests/filestorage/databases/fs-files/6866/IhP0101c961f.file index c185704..e0150b7 100644 --- a/tests/filestorage/databases/fs-files/6125/IgO9Dd1cX61f.file +++ b/tests/filestorage/databases/fs-files/6866/IhP0101c961f.file @@ -1,4 +1,4 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:20:40.199Z"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:26:08.684Z"} diff --git a/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file b/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file new file mode 100644 index 0000000..de157ed --- /dev/null +++ b/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.700Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file b/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file new file mode 100644 index 0000000..afce18a --- /dev/null +++ b/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.435Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file b/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file deleted file mode 100644 index 88bde94..0000000 --- a/tests/filestorage/databases/fs-files/7723/IgOGPf1cn61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.592Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file b/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file deleted file mode 100644 index efeb324..0000000 --- a/tests/filestorage/databases/fs-files/7755/IgO9LF1cd61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:27.312Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file b/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file new file mode 100644 index 0000000..679021e --- /dev/null +++ b/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.952Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file b/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file deleted file mode 100644 index 4dadc75..0000000 --- a/tests/filestorage/databases/fs-files/8306/IgO9HZ1dg60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:04.520Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file b/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file deleted file mode 100644 index ef0d05c..0000000 --- a/tests/filestorage/databases/fs-files/8624/IgO6Vy1cU61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:03:20.638Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file b/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file new file mode 100644 index 0000000..5c1dae3 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:25:12.416Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file b/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file new file mode 100644 index 0000000..ea3d877 --- /dev/null +++ b/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.430Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log index d116045..293abfa 100644 --- a/tests/filestorage/databases/fs-files/files.log +++ b/tests/filestorage/databases/fs-files/files.log @@ -1,15 +1,20 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T00:56:21.574Z","id":"IgO5QN1cH61f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:02:48.365Z","id":"IgO6Ql1c461f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:03:20.638Z","id":"IgO6Vy1cU61f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:20:40.199Z","id":"IgO9Dd1cX61f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:04.511Z","id":"IgO9HZ1cg61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:04.520Z","id":"IgO9HZ1dg60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-03-29T01:21:27.312Z","id":"IgO9LF1cd61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T01:21:27.319Z","id":"IgO9LF1dd60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.592Z","id":"IgOGPf1cn61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:06:45.599Z","id":"IgOGPf1dn60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.200Z","id":"IgOGpZ1cY61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:09:26.211Z","id":"IgOGpa1dY60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.009Z","id":"IgOH6d1cQ61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.019Z","id":"IgOH6e1dQ60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-03-29T02:11:12.022Z","id":"IgOH6e1eQ61f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:20:58.426Z","id":"IhOzCy1c561f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.435Z","id":"IhOzCy1d560f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.442Z","id":"IhOzCy1e561f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.448Z","id":"IhOzCy1f560f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:22:13.886Z","id":"IhOzP81cV61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.952Z","id":"IhOzP91dV60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.964Z","id":"IhOzP91eV61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.978Z","id":"IhOzP91fV60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:25:12.416Z","id":"IhOzrw1co61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.424Z","id":"IhOzrw1do60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.427Z","id":"IhOzrw1eo61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.430Z","id":"IhOzrw1fo60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:26:08.684Z","id":"IhP0101c961f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.692Z","id":"IhP0101d960f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.697Z","id":"IhP0101e961f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.700Z","id":"IhP0101f960f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:59:30.340Z","id":"IhP5Dr1cP61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.347Z","id":"IhP5Dr1dP60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.350Z","id":"IhP5Dr1eP61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.353Z","id":"IhP5Dr1fP60f"} diff --git a/tests/filestorage/index.js b/tests/filestorage/index.js index c1c9930..3d17c2a 100644 --- a/tests/filestorage/index.js +++ b/tests/filestorage/index.js @@ -10,20 +10,19 @@ ON('ready', function() { Test.push('FileStorage - ', function(next) { var arr = []; var filestorage = FILESTORAGE(CONF.fs); - - // arr.push(function(resume) { - //RESTBuilder.POST(url + '/upload').file('logo', 'logo.svg', 'https://www.totaljs.com/download/IYsqOb1cr61f.svg').exec(function(err, response) { - // Test.print('FS - upload', err === null && response ? null : 'Failed to upload file'); - // resume(); - // }); - // }); - + var download; + arr.push(function(resume) { + RESTBuilder.POST(url + '/upload').file('logo', 'logo.svg', 'https://www.totaljs.com/download/IYsqOb1cr61f.svg').exec(function(err, response) { + download = url + '/downloads/IhOzP81cV61f.svg'; + Test.print('FS - upload', err === null && response ? null : 'Failed to upload file'); + resume(); + }); + }); arr.push(function(resume) { var filename = 'smallfile.txt'; var id = UID(); filestorage.save(id, filename, PATH.root(filename), function(err, response) { - console.log(response); Test.print('FS - save - file', err === null && response ? null : 'Failed to save file'); resume(); }); @@ -52,6 +51,14 @@ ON('ready', function() { resume(); }); }); + + + arr.push(function(resume) { + RESTBuilder.GET(download).exec(function(err, file, output) { + console.log(file, output); + resume(); + }); + }); arr.async(next); }); @@ -59,5 +66,5 @@ ON('ready', function() { Test.run(function() { console.log('DONE'); }); - }, 5000); + }, 2000); }); \ No newline at end of file diff --git a/tests/filestorage/tmp/upload_1.bin b/tests/filestorage/tmp/upload_1.bin deleted file mode 100644 index e69de29..0000000 From 82ad5ed0e67322e314fa0e03876320960e3af2c4 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Mon, 15 Apr 2024 10:25:50 +0000 Subject: [PATCH 07/28] Removed useless files --- .../databases/fs-files/0177/IhP5Dr1eP61f.file | 21 ------- .../databases/fs-files/0356/IhP0101d960f.file | 21 ------- .../databases/fs-files/0617/IhOzP81cV61f.file | 63 ------------------- .../databases/fs-files/1098/IhOzCy1e561f.file | 21 ------- .../databases/fs-files/1340/IhOzP91eV61f.file | 21 ------- .../databases/fs-files/2479/IhOzrw1do60f.file | 21 ------- .../databases/fs-files/3135/IhP5Dr1cP61f.file | 63 ------------------- .../databases/fs-files/3667/IhP5Dr1fP60f.file | 21 ------- .../databases/fs-files/3908/IhP0101e961f.file | 21 ------- .../databases/fs-files/4056/IhOzCy1c561f.file | 63 ------------------- .../databases/fs-files/4588/IhOzCy1f560f.file | 21 ------- .../databases/fs-files/4830/IhOzP91fV60f.file | 21 ------- .../databases/fs-files/6031/IhOzrw1eo61f.file | 21 ------- .../databases/fs-files/6625/IhP5Dr1dP60f.file | 21 ------- .../databases/fs-files/6866/IhP0101c961f.file | 63 ------------------- .../databases/fs-files/7398/IhP0101f960f.file | 21 ------- .../databases/fs-files/7546/IhOzCy1d560f.file | 21 ------- .../databases/fs-files/7788/IhOzP91dV60f.file | 21 ------- .../databases/fs-files/8989/IhOzrw1co61f.file | 63 ------------------- .../databases/fs-files/9521/IhOzrw1fo60f.file | 21 ------- .../filestorage/databases/fs-files/files.log | 20 ------ 21 files changed, 650 deletions(-) delete mode 100644 tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file delete mode 100644 tests/filestorage/databases/fs-files/0356/IhP0101d960f.file delete mode 100644 tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file delete mode 100644 tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file delete mode 100644 tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file delete mode 100644 tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file delete mode 100644 tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file delete mode 100644 tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file delete mode 100644 tests/filestorage/databases/fs-files/3908/IhP0101e961f.file delete mode 100644 tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file delete mode 100644 tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file delete mode 100644 tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file delete mode 100644 tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file delete mode 100644 tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file delete mode 100644 tests/filestorage/databases/fs-files/6866/IhP0101c961f.file delete mode 100644 tests/filestorage/databases/fs-files/7398/IhP0101f960f.file delete mode 100644 tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file delete mode 100644 tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file delete mode 100644 tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file delete mode 100644 tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file delete mode 100644 tests/filestorage/databases/fs-files/files.log diff --git a/tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file b/tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file deleted file mode 100644 index 709482d..0000000 --- a/tests/filestorage/databases/fs-files/0177/IhP5Dr1eP61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.350Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0356/IhP0101d960f.file b/tests/filestorage/databases/fs-files/0356/IhP0101d960f.file deleted file mode 100644 index 720c9db..0000000 --- a/tests/filestorage/databases/fs-files/0356/IhP0101d960f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.692Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file b/tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file deleted file mode 100644 index 6621240..0000000 --- a/tests/filestorage/databases/fs-files/0617/IhOzP81cV61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:22:13.886Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file b/tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file deleted file mode 100644 index 89c7774..0000000 --- a/tests/filestorage/databases/fs-files/1098/IhOzCy1e561f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.442Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file b/tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file deleted file mode 100644 index e9a1059..0000000 --- a/tests/filestorage/databases/fs-files/1340/IhOzP91eV61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.964Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file b/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file deleted file mode 100644 index a89cf34..0000000 --- a/tests/filestorage/databases/fs-files/2479/IhOzrw1do60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.424Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file b/tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file deleted file mode 100644 index 437ac08..0000000 --- a/tests/filestorage/databases/fs-files/3135/IhP5Dr1cP61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:59:30.340Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file b/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file deleted file mode 100644 index 4c393be..0000000 --- a/tests/filestorage/databases/fs-files/3667/IhP5Dr1fP60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.353Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file b/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file deleted file mode 100644 index 2bcffb5..0000000 --- a/tests/filestorage/databases/fs-files/3908/IhP0101e961f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.697Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file b/tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file deleted file mode 100644 index af3fca6..0000000 --- a/tests/filestorage/databases/fs-files/4056/IhOzCy1c561f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:20:58.426Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file b/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file deleted file mode 100644 index 40594ff..0000000 --- a/tests/filestorage/databases/fs-files/4588/IhOzCy1f560f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.448Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file b/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file deleted file mode 100644 index 4427d90..0000000 --- a/tests/filestorage/databases/fs-files/4830/IhOzP91fV60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.978Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file b/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file deleted file mode 100644 index 89a8379..0000000 --- a/tests/filestorage/databases/fs-files/6031/IhOzrw1eo61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.427Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file b/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file deleted file mode 100644 index 2cb4806..0000000 --- a/tests/filestorage/databases/fs-files/6625/IhP5Dr1dP60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.347Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6866/IhP0101c961f.file b/tests/filestorage/databases/fs-files/6866/IhP0101c961f.file deleted file mode 100644 index e0150b7..0000000 --- a/tests/filestorage/databases/fs-files/6866/IhP0101c961f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:26:08.684Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file b/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file deleted file mode 100644 index de157ed..0000000 --- a/tests/filestorage/databases/fs-files/7398/IhP0101f960f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.700Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file b/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file deleted file mode 100644 index afce18a..0000000 --- a/tests/filestorage/databases/fs-files/7546/IhOzCy1d560f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.435Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file b/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file deleted file mode 100644 index 679021e..0000000 --- a/tests/filestorage/databases/fs-files/7788/IhOzP91dV60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.952Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file b/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file deleted file mode 100644 index 5c1dae3..0000000 --- a/tests/filestorage/databases/fs-files/8989/IhOzrw1co61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:25:12.416Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file b/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file deleted file mode 100644 index ea3d877..0000000 --- a/tests/filestorage/databases/fs-files/9521/IhOzrw1fo60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.430Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log deleted file mode 100644 index 293abfa..0000000 --- a/tests/filestorage/databases/fs-files/files.log +++ /dev/null @@ -1,20 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:20:58.426Z","id":"IhOzCy1c561f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.435Z","id":"IhOzCy1d560f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.442Z","id":"IhOzCy1e561f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:20:58.448Z","id":"IhOzCy1f560f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:22:13.886Z","id":"IhOzP81cV61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.952Z","id":"IhOzP91dV60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.964Z","id":"IhOzP91eV61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:22:13.978Z","id":"IhOzP91fV60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:25:12.416Z","id":"IhOzrw1co61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.424Z","id":"IhOzrw1do60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.427Z","id":"IhOzrw1eo61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:25:12.430Z","id":"IhOzrw1fo60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:26:08.684Z","id":"IhP0101c961f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.692Z","id":"IhP0101d960f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.697Z","id":"IhP0101e961f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:26:08.700Z","id":"IhP0101f960f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T09:59:30.340Z","id":"IhP5Dr1cP61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.347Z","id":"IhP5Dr1dP60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.350Z","id":"IhP5Dr1eP61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T09:59:30.353Z","id":"IhP5Dr1fP60f"} From c40e56bd03fb579586a4ec408dd76d26ca300ba9 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Mon, 15 Apr 2024 10:26:27 +0000 Subject: [PATCH 08/28] Added tests for htmlparser --- tests/common/htmlparser.js | 647 +++++++++++++++++++++++++++++++++++++ 1 file changed, 647 insertions(+) diff --git a/tests/common/htmlparser.js b/tests/common/htmlparser.js index e69de29..1e5340a 100644 --- a/tests/common/htmlparser.js +++ b/tests/common/htmlparser.js @@ -0,0 +1,647 @@ +/* eslint-disable */ +require('../../index'); // Total.js framework v5 +require('../../test'); // Unit test module + +F.http(); // Starts the framework + +ON('ready', function () { + Test.push('HTML Parser', function (next) { + var value, correct, response, parsed, div, p, span, str; + var arr = []; + + // Test for innerHTML + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.innerHTML; + Test.print('Basic HTML Element with innerHTML', (!response || response !== correct) ? 'Failed to retrieve innerHTML correctly' : null); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'Hello World'; + parsed = value.parseHTML(); // Assuming this returns an parsed simulating an HTMLElement + response = parsed.innerText; // Access as a property, not a method + Test.print('Basic HTML Element with innerText', (!response || response !== correct) ? 'Failed to parse basic HTML element with innerText' : null); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.find('p')[0]; + Test.print('Basic Usage: Find p element', response.innerHTML == correct ? null : 'Expected ' + correct); + resume(); + }); + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.find('div p')[0]; + Test.print('Nested Elements: Find p elements within div', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.find('p.classname')[0]; + Test.print('Element Attributes: Find p elements with classname', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + // arr.push(function(resume) { + // value = '

Hello World

'; + // correct = '

Hello World

'; + // parsed = value.parseHTML(); + // response = parsed.find('p', true); + // console.log(parsed); + // Test.print('Reverse Searching: Found p elements from parent to children', response.innerHTML === correct ? null : 'Expected ' + correct); + // resume(); + // }); + + arr.push(function(resume) { + value = '
'; + correct = undefined; + parsed = value.parseHTML(); + response = parsed.find('p'); + Test.print('Edge Cases: Handling empty selector', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test cases for HTMLElement.prototype.parent() + arr.push(function(resume) { + value = '

Hello World

'; + correct = undefined; + parsed = value.parseHTML(); + response = parsed.parent(); + Test.print('parent: Get parent node of an element (undefined if no parent)', response === correct ? null : 'Expected null'); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.parent(); + Test.print('parent: Get parent node of an element (parent is div)', response !== null && response.tagName === 'DIV' ? null : 'Expected div'); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var div = parsed.find('div')[0]; + response = div.parent(); + Test.print('parent: Get parent node of an element (parent is body)', response !== null && response.tagName === 'BODY' ? null : 'Expected body'); + resume(); + }); + + // Test cases for HTMLElement.prototype.closest() + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'DIV'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.closest('div')[0]; + Test.print('closest: Find closest ancestor of an element (div is the closest)', response.tagName === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'BODY'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.closest('body')[0]; + Test.print('closest: Find closest ancestor of an element (body is the closest)', response.tagName === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.closest('div')[0]; + Test.print('closest: Find closest ancestor of an element (grandparent is the closest)', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test cases for HTMLElement.prototype.attrd() + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.attrd('test', 'value'); + Test.print('attrd: Add data attribute to an element', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var div = parsed.find('div')[0]; + response = div.attrd('test', 'value'); + Test.print('attrd: Add data attribute to an element (nested)', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + var p = parsed.find('p')[0]; + response = p.attrd('test', ''); + Test.print('attrd: Add empty data attribute to an element', response.innerHTML === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = undefined; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('class'); + Test.print('attr: Get attribute value (undefined if attribute does not exist)', response === correct ? null : 'Expected null'); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'paragraph'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('class'); + Test.print('attr: Get attribute value', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('id', 'unique'); + Test.print('attr: Set attribute value', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('id', null); + Test.print('attr: Remove attribute', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('data-test', 'value'); + Test.print('attr: Set data attribute value', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.attr('data-test', ''); + Test.print('attr: Remove data attribute value', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.aclass('test'); + Test.print('aclass: Add single class to element', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.aclass('test'); + Test.print('aclass: Add multiple classes to element', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.aclass(''); + Test.print('aclass: Add empty class to element', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = true; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.hclass('test'); + Test.print('hclass: Check if element has single class (true)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = true; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.hclass('paragraph'); + Test.print('hclass: Check if element has multiple classes (true)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = false; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.hclass('test'); + Test.print('hclass: Check if element has non-existing class (false)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = false; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.hclass('test'); + Test.print('hclass: Check if element has no class (false)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', false); + Test.print('tclass: Toggle single class off', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', true); + Test.print('tclass: Toggle single class on (already present)', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', true); + Test.print('tclass: Toggle single class on (not present)', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', false); + Test.print('tclass: Toggle single class off (with no value provided)', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', false); + Test.print('tclass: Toggle multiple classes off', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.tclass('test', true); + Test.print('tclass: Toggle multiple classes on', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.rclass('test'); + Test.print('rclass: Remove single class', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.rclass('test'); + Test.print('rclass: Remove single class (multiple classes present)', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.rclass('paragraph'); + Test.print('rclass: Remove non-existing class', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.rclass('test paragraph'); + Test.print('rclass: Remove multiple classes', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.rclass(''); + Test.print('rclass: Remove empty class (no effect)', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.css('color', 'red'); + Test.print('css: Set single CSS property', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.css({'color': 'red', 'font-size': '16px'}); + Test.print('css: Set multiple CSS properties', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.css({'color': ''}); + Test.print('css: Remove multiple CSS properties', response.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = ''; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + response = div.remove(); + Test.print('remove: Remove element with parent', response && parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = ''; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.remove(); + Test.print('remove: Remove element without parent', response && parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

Goodbye
'; + correct = '
Goodbye
'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.remove(); + Test.print('remove: Remove element with siblings', response && parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

Goodbye
'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + span = parsed.find('span')[0]; + response = span.remove(); + Test.print('remove: Remove sibling element', response && parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
'; + str = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.append(str); + Test.print('append: Append single element to empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Existing

'; + str = 'New'; + correct = '

Existing

New
'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.append(str); + Test.print('append: Append single element to non-empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
'; + str = '

One

Two

'; + correct = '

One

Two

'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.append(str); + Test.print('append: Append multiple elements to empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Existing

'; + str = 'New1New2'; + correct = '

Existing

New1New2
'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.append(str); + Test.print('append: Append multiple elements to non-empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
'; + str = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.prepend(str); + Test.print('prepend: Prepend single element to empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
Existing
'; + str = '

New

'; + correct = '

New

Existing
'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.prepend(str); + Test.print('prepend: Prepend single element to non-empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
'; + str = '

Two

One

'; + correct = '

One

Two

'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.prepend(str); + Test.print('prepend: Prepend multiple elements to empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '
Existing
'; + str = '

New1

New2

'; + correct = '

New2

New1

Existing
'; + parsed = value.parseHTML(); + div = parsed.find('div')[0]; + div.prepend(str); + Test.print('prepend: Prepend multiple elements to non-empty parent', parsed.toString() === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'Hello World'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.text(); + Test.print('text: Get text content of element with nested tags', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'Hello World'; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.text(); + Test.print('text: Get text content of element without nested tags', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

'; + correct = ''; + parsed = value.parseHTML(); + p = parsed.find('p')[0]; + response = p.text(); + Test.print('text: Get text content of empty element', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = 'World'; + parsed = value.parseHTML(); + span = parsed.find('span')[0]; + response = span.text(); + Test.print('text: Get text content of nested element', response === correct ? null : 'Expected ' + correct); + resume(); + }); + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.toString(); + Test.print('toString: Convert HTML elements to string (unformatted)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

Hello World

'; + parsed = value.parseHTML(); + response = parsed.html(); + Test.print('html: Convert HTML elements to string (unformatted)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

\n\tHello \n\t\n\t\tWorld\n\t\n

'; + parsed = value.parseHTML(); + response = parsed.toString(true); + Test.print('toString: Convert HTML elements to string (formatted)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = '

Hello World

'; + correct = '

\n\tHello \n\t\n\t\tWorld\n\t\n

'; + parsed = value.parseHTML(); + response = parsed.html(true); + Test.print('html: Convert HTML elements to string (formatted)', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.async(next); // Trigger the tests execution + }); + + setTimeout(function () { + Test.run(); + }, 600); +}); From e4e9cc6fe99d257ddeb9d584674de15c17746e06 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 06:25:55 +0000 Subject: [PATCH 09/28] Fixed restbuilder --- .../databases/fs-files/0372/IhSAYI1eH61f.file | 21 +++++++ .../databases/fs-files/0805/IhPBFK1cn61f.file | 63 +++++++++++++++++++ .../databases/fs-files/1337/IhPBFK1fn60f.file | 21 +++++++ .../databases/fs-files/1420/IhPB7Z1e761f.file | 21 +++++++ .../databases/fs-files/1885/IhPAmm1er61f.file | 21 +++++++ .../databases/fs-files/2512/IhPBNd1ev61f.file | 21 +++++++ .../databases/fs-files/2541/IhPArW1fi60f.file | 21 +++++++ .../databases/fs-files/3330/IhSAYI1cH61f.file | 63 +++++++++++++++++++ .../databases/fs-files/3862/IhSAYI1fH60f.file | 21 +++++++ .../databases/fs-files/4295/IhPBFK1dn60f.file | 21 +++++++ .../databases/fs-files/4378/IhPB7Z1c761f.file | 63 +++++++++++++++++++ .../databases/fs-files/4843/IhPAmm1cr61f.file | 63 +++++++++++++++++++ .../databases/fs-files/4910/IhPB7Z1f760f.file | 21 +++++++ .../databases/fs-files/5375/IhPAmm1fr60f.file | 21 +++++++ .../databases/fs-files/5470/IhPBNd1cv61f.file | 63 +++++++++++++++++++ .../databases/fs-files/5499/IhPArW1di60f.file | 21 +++++++ .../databases/fs-files/6002/IhPBNd1fv60f.file | 21 +++++++ .../databases/fs-files/6820/IhSAYI1dH60f.file | 21 +++++++ .../databases/fs-files/7847/IhPBFK1en61f.file | 21 +++++++ .../databases/fs-files/7868/IhPB7Z1d760f.file | 21 +++++++ .../databases/fs-files/8328/IhPArV1ci61f.file | 63 +++++++++++++++++++ .../databases/fs-files/8333/IhPAmm1dr60f.file | 21 +++++++ .../databases/fs-files/8960/IhPBNd1dv60f.file | 21 +++++++ .../databases/fs-files/9051/IhPArW1ei61f.file | 21 +++++++ .../filestorage/databases/fs-files/files.log | 24 +++++++ tests/filestorage/index.js | 4 +- 26 files changed, 782 insertions(+), 2 deletions(-) create mode 100644 tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file create mode 100644 tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file create mode 100644 tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file create mode 100644 tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file create mode 100644 tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file create mode 100644 tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file create mode 100644 tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file create mode 100644 tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file create mode 100644 tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file create mode 100644 tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file create mode 100644 tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file create mode 100644 tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file create mode 100644 tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file create mode 100644 tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file create mode 100644 tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file create mode 100644 tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file create mode 100644 tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file create mode 100644 tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file create mode 100644 tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file create mode 100644 tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file create mode 100644 tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file create mode 100644 tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file create mode 100644 tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file create mode 100644 tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file create mode 100644 tests/filestorage/databases/fs-files/files.log diff --git a/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file b/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file new file mode 100644 index 0000000..6a9b87e --- /dev/null +++ b/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.452Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file b/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file new file mode 100644 index 0000000..9415e6c --- /dev/null +++ b/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:05.845Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file b/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file new file mode 100644 index 0000000..068cf9c --- /dev/null +++ b/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.862Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file b/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file new file mode 100644 index 0000000..1d61e4b --- /dev/null +++ b/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.731Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file b/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file new file mode 100644 index 0000000..ca3eed7 --- /dev/null +++ b/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.848Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file b/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file new file mode 100644 index 0000000..1a64352 --- /dev/null +++ b/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.377Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file b/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file new file mode 100644 index 0000000..5ee5542 --- /dev/null +++ b/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.224Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file b/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file new file mode 100644 index 0000000..b93fdd0 --- /dev/null +++ b/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T06:25:17.437Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file b/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file new file mode 100644 index 0000000..09d4601 --- /dev/null +++ b/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.454Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file b/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file new file mode 100644 index 0000000..c59417b --- /dev/null +++ b/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.855Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file b/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file new file mode 100644 index 0000000..4ecc1fa --- /dev/null +++ b/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:37:17.716Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file b/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file new file mode 100644 index 0000000..0a747e4 --- /dev/null +++ b/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:08.834Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file b/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file new file mode 100644 index 0000000..c05340f --- /dev/null +++ b/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.733Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file b/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file new file mode 100644 index 0000000..34f6565 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.851Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file b/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file new file mode 100644 index 0000000..128ece4 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:57.366Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file b/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file new file mode 100644 index 0000000..86bd620 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.216Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file b/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file new file mode 100644 index 0000000..b52e9cc --- /dev/null +++ b/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.381Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file b/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file new file mode 100644 index 0000000..d82f199 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.447Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file b/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file new file mode 100644 index 0000000..7b2e946 --- /dev/null +++ b/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.858Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file b/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file new file mode 100644 index 0000000..4f3e1f7 --- /dev/null +++ b/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.728Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file b/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file new file mode 100644 index 0000000..3191672 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:38.205Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file b/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file new file mode 100644 index 0000000..5016398 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.843Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file b/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file new file mode 100644 index 0000000..89b1f9d --- /dev/null +++ b/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.374Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file b/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file new file mode 100644 index 0000000..809fee8 --- /dev/null +++ b/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.221Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log new file mode 100644 index 0000000..af18e96 --- /dev/null +++ b/tests/filestorage/databases/fs-files/files.log @@ -0,0 +1,24 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:08.834Z","id":"IhPAmm1cr61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.843Z","id":"IhPAmm1dr60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.848Z","id":"IhPAmm1er61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.851Z","id":"IhPAmm1fr60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:38.205Z","id":"IhPArV1ci61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.216Z","id":"IhPArW1di60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.221Z","id":"IhPArW1ei61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.224Z","id":"IhPArW1fi60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:37:17.716Z","id":"IhPB7Z1c761f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.728Z","id":"IhPB7Z1d760f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.731Z","id":"IhPB7Z1e761f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.733Z","id":"IhPB7Z1f760f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:05.845Z","id":"IhPBFK1cn61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.855Z","id":"IhPBFK1dn60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.858Z","id":"IhPBFK1en61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.862Z","id":"IhPBFK1fn60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:57.366Z","id":"IhPBNd1cv61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.374Z","id":"IhPBNd1dv60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.377Z","id":"IhPBNd1ev61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.381Z","id":"IhPBNd1fv60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T06:25:17.437Z","id":"IhSAYI1cH61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.447Z","id":"IhSAYI1dH60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.452Z","id":"IhSAYI1eH61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.454Z","id":"IhSAYI1fH60f"} diff --git a/tests/filestorage/index.js b/tests/filestorage/index.js index 3d17c2a..5e055aa 100644 --- a/tests/filestorage/index.js +++ b/tests/filestorage/index.js @@ -13,8 +13,8 @@ ON('ready', function() { var download; arr.push(function(resume) { RESTBuilder.POST(url + '/upload').file('logo', 'logo.svg', 'https://www.totaljs.com/download/IYsqOb1cr61f.svg').exec(function(err, response) { - download = url + '/downloads/IhOzP81cV61f.svg'; Test.print('FS - upload', err === null && response ? null : 'Failed to upload file'); + download = url + response.url; resume(); }); }); @@ -54,7 +54,7 @@ ON('ready', function() { arr.push(function(resume) { - RESTBuilder.GET(download).exec(function(err, file, output) { + RESTBuilder.GET(download).callback(function(err, file, output) { console.log(file, output); resume(); }); From ace8361eb0f56167f3baee1d12a874e0697f392d Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 06:26:32 +0000 Subject: [PATCH 10/28] Clean code --- .../databases/fs-files/0372/IhSAYI1eH61f.file | 21 ------- .../databases/fs-files/0805/IhPBFK1cn61f.file | 63 ------------------- .../databases/fs-files/1337/IhPBFK1fn60f.file | 21 ------- .../databases/fs-files/1420/IhPB7Z1e761f.file | 21 ------- .../databases/fs-files/1885/IhPAmm1er61f.file | 21 ------- .../databases/fs-files/2512/IhPBNd1ev61f.file | 21 ------- .../databases/fs-files/2541/IhPArW1fi60f.file | 21 ------- .../databases/fs-files/3330/IhSAYI1cH61f.file | 63 ------------------- .../databases/fs-files/3862/IhSAYI1fH60f.file | 21 ------- .../databases/fs-files/4295/IhPBFK1dn60f.file | 21 ------- .../databases/fs-files/4378/IhPB7Z1c761f.file | 63 ------------------- .../databases/fs-files/4843/IhPAmm1cr61f.file | 63 ------------------- .../databases/fs-files/4910/IhPB7Z1f760f.file | 21 ------- .../databases/fs-files/5375/IhPAmm1fr60f.file | 21 ------- .../databases/fs-files/5470/IhPBNd1cv61f.file | 63 ------------------- .../databases/fs-files/5499/IhPArW1di60f.file | 21 ------- .../databases/fs-files/6002/IhPBNd1fv60f.file | 21 ------- .../databases/fs-files/6820/IhSAYI1dH60f.file | 21 ------- .../databases/fs-files/7847/IhPBFK1en61f.file | 21 ------- .../databases/fs-files/7868/IhPB7Z1d760f.file | 21 ------- .../databases/fs-files/8328/IhPArV1ci61f.file | 63 ------------------- .../databases/fs-files/8333/IhPAmm1dr60f.file | 21 ------- .../databases/fs-files/8960/IhPBNd1dv60f.file | 21 ------- .../databases/fs-files/9051/IhPArW1ei61f.file | 21 ------- .../filestorage/databases/fs-files/files.log | 24 ------- 25 files changed, 780 deletions(-) delete mode 100644 tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file delete mode 100644 tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file delete mode 100644 tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file delete mode 100644 tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file delete mode 100644 tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file delete mode 100644 tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file delete mode 100644 tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file delete mode 100644 tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file delete mode 100644 tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file delete mode 100644 tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file delete mode 100644 tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file delete mode 100644 tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file delete mode 100644 tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file delete mode 100644 tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file delete mode 100644 tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file delete mode 100644 tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file delete mode 100644 tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file delete mode 100644 tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file delete mode 100644 tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file delete mode 100644 tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file delete mode 100644 tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file delete mode 100644 tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file delete mode 100644 tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file delete mode 100644 tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file delete mode 100644 tests/filestorage/databases/fs-files/files.log diff --git a/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file b/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file deleted file mode 100644 index 6a9b87e..0000000 --- a/tests/filestorage/databases/fs-files/0372/IhSAYI1eH61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.452Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file b/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file deleted file mode 100644 index 9415e6c..0000000 --- a/tests/filestorage/databases/fs-files/0805/IhPBFK1cn61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:05.845Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file b/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file deleted file mode 100644 index 068cf9c..0000000 --- a/tests/filestorage/databases/fs-files/1337/IhPBFK1fn60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.862Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file b/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file deleted file mode 100644 index 1d61e4b..0000000 --- a/tests/filestorage/databases/fs-files/1420/IhPB7Z1e761f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.731Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file b/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file deleted file mode 100644 index ca3eed7..0000000 --- a/tests/filestorage/databases/fs-files/1885/IhPAmm1er61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.848Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file b/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file deleted file mode 100644 index 1a64352..0000000 --- a/tests/filestorage/databases/fs-files/2512/IhPBNd1ev61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.377Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file b/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file deleted file mode 100644 index 5ee5542..0000000 --- a/tests/filestorage/databases/fs-files/2541/IhPArW1fi60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.224Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file b/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file deleted file mode 100644 index b93fdd0..0000000 --- a/tests/filestorage/databases/fs-files/3330/IhSAYI1cH61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T06:25:17.437Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file b/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file deleted file mode 100644 index 09d4601..0000000 --- a/tests/filestorage/databases/fs-files/3862/IhSAYI1fH60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.454Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file b/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file deleted file mode 100644 index c59417b..0000000 --- a/tests/filestorage/databases/fs-files/4295/IhPBFK1dn60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.855Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file b/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file deleted file mode 100644 index 4ecc1fa..0000000 --- a/tests/filestorage/databases/fs-files/4378/IhPB7Z1c761f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:37:17.716Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file b/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file deleted file mode 100644 index 0a747e4..0000000 --- a/tests/filestorage/databases/fs-files/4843/IhPAmm1cr61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:08.834Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file b/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file deleted file mode 100644 index c05340f..0000000 --- a/tests/filestorage/databases/fs-files/4910/IhPB7Z1f760f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.733Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file b/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file deleted file mode 100644 index 34f6565..0000000 --- a/tests/filestorage/databases/fs-files/5375/IhPAmm1fr60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.851Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file b/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file deleted file mode 100644 index 128ece4..0000000 --- a/tests/filestorage/databases/fs-files/5470/IhPBNd1cv61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:57.366Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file b/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file deleted file mode 100644 index 86bd620..0000000 --- a/tests/filestorage/databases/fs-files/5499/IhPArW1di60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.216Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file b/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file deleted file mode 100644 index b52e9cc..0000000 --- a/tests/filestorage/databases/fs-files/6002/IhPBNd1fv60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.381Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file b/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file deleted file mode 100644 index d82f199..0000000 --- a/tests/filestorage/databases/fs-files/6820/IhSAYI1dH60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.447Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file b/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file deleted file mode 100644 index 7b2e946..0000000 --- a/tests/filestorage/databases/fs-files/7847/IhPBFK1en61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.858Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file b/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file deleted file mode 100644 index 4f3e1f7..0000000 --- a/tests/filestorage/databases/fs-files/7868/IhPB7Z1d760f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.728Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file b/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file deleted file mode 100644 index 3191672..0000000 --- a/tests/filestorage/databases/fs-files/8328/IhPArV1ci61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:38.205Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file b/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file deleted file mode 100644 index 5016398..0000000 --- a/tests/filestorage/databases/fs-files/8333/IhPAmm1dr60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.843Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file b/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file deleted file mode 100644 index 89b1f9d..0000000 --- a/tests/filestorage/databases/fs-files/8960/IhPBNd1dv60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.374Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file b/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file deleted file mode 100644 index 809fee8..0000000 --- a/tests/filestorage/databases/fs-files/9051/IhPArW1ei61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.221Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log deleted file mode 100644 index af18e96..0000000 --- a/tests/filestorage/databases/fs-files/files.log +++ /dev/null @@ -1,24 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:08.834Z","id":"IhPAmm1cr61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.843Z","id":"IhPAmm1dr60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.848Z","id":"IhPAmm1er61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:08.851Z","id":"IhPAmm1fr60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:35:38.205Z","id":"IhPArV1ci61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.216Z","id":"IhPArW1di60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.221Z","id":"IhPArW1ei61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:35:38.224Z","id":"IhPArW1fi60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:37:17.716Z","id":"IhPB7Z1c761f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.728Z","id":"IhPB7Z1d760f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.731Z","id":"IhPB7Z1e761f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:37:17.733Z","id":"IhPB7Z1f760f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:05.845Z","id":"IhPBFK1cn61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.855Z","id":"IhPBFK1dn60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.858Z","id":"IhPBFK1en61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:05.862Z","id":"IhPBFK1fn60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-15T10:38:57.366Z","id":"IhPBNd1cv61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.374Z","id":"IhPBNd1dv60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.377Z","id":"IhPBNd1ev61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-15T10:38:57.381Z","id":"IhPBNd1fv60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T06:25:17.437Z","id":"IhSAYI1cH61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.447Z","id":"IhSAYI1dH60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.452Z","id":"IhSAYI1eH61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T06:25:17.454Z","id":"IhSAYI1fH60f"} From 6190ec603cf35db06b939cacbdf34de5db48b962 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 08:06:51 +0000 Subject: [PATCH 11/28] Complete test for --- .../databases/fs-files/0439/IhSQ5S1dc60f.file | 21 +++++++ .../databases/fs-files/1139/IhSOn81cO61f.file | 63 +++++++++++++++++++ .../databases/fs-files/1806/IhSQB61eb61f.file | 21 +++++++ .../databases/fs-files/1862/IhSOn91eO61f.file | 21 +++++++ .../databases/fs-files/2680/IhSQGe1db60f.file | 21 +++++++ .../databases/fs-files/2921/IhSPQH1dY60f.file | 21 +++++++ .../databases/fs-files/3991/IhSQ5S1ec61f.file | 21 +++++++ .../databases/fs-files/4764/IhSQB61cb61f.file | 63 +++++++++++++++++++ .../databases/fs-files/5296/IhSQB61fb60f.file | 21 +++++++ .../databases/fs-files/5352/IhSOn91fO60f.file | 21 +++++++ .../databases/fs-files/6232/IhSQGe1eb61f.file | 21 +++++++ .../databases/fs-files/6473/IhSPQH1eY61f.file | 21 +++++++ .../databases/fs-files/6949/IhSQ5S1cc61f.file | 63 +++++++++++++++++++ .../databases/fs-files/7481/IhSQ5S1fc60f.file | 21 +++++++ .../databases/fs-files/8254/IhSQB61db60f.file | 21 +++++++ .../databases/fs-files/8310/IhSOn91dO60f.file | 21 +++++++ .../databases/fs-files/9431/IhSPQH1cY61f.file | 63 +++++++++++++++++++ .../databases/fs-files/9722/IhSQGe1fb60f.file | 21 +++++++ .../databases/fs-files/9963/IhSPQH1fY60f.file | 21 +++++++ .../filestorage/databases/fs-files/files.log | 20 ++++++ tests/filestorage/index.js | 19 +++++- 21 files changed, 605 insertions(+), 1 deletion(-) create mode 100644 tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file create mode 100644 tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file create mode 100644 tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file create mode 100644 tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file create mode 100644 tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file create mode 100644 tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file create mode 100644 tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file create mode 100644 tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file create mode 100644 tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file create mode 100644 tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file create mode 100644 tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file create mode 100644 tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file create mode 100644 tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file create mode 100644 tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file create mode 100644 tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file create mode 100644 tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file create mode 100644 tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file create mode 100644 tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file create mode 100644 tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file create mode 100644 tests/filestorage/databases/fs-files/files.log diff --git a/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file b/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file new file mode 100644 index 0000000..b514648 --- /dev/null +++ b/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.080Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file b/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file new file mode 100644 index 0000000..44e8529 --- /dev/null +++ b/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T07:56:31.100Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file b/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file new file mode 100644 index 0000000..4f92f1a --- /dev/null +++ b/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.060Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file b/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file new file mode 100644 index 0000000..1e95995 --- /dev/null +++ b/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.114Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file b/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file new file mode 100644 index 0000000..27a74ef --- /dev/null +++ b/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.476Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file b/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file new file mode 100644 index 0000000..78ef9b9 --- /dev/null +++ b/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.737Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file b/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file new file mode 100644 index 0000000..ffe1c33 --- /dev/null +++ b/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.087Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file b/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file new file mode 100644 index 0000000..2b69974 --- /dev/null +++ b/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:24.049Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file b/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file new file mode 100644 index 0000000..15310a9 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.063Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file b/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file new file mode 100644 index 0000000..76ff659 --- /dev/null +++ b/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.117Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file b/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file new file mode 100644 index 0000000..83712bf --- /dev/null +++ b/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.480Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file b/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file new file mode 100644 index 0000000..076aff9 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.740Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file b/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file new file mode 100644 index 0000000..e000031 --- /dev/null +++ b/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:04:49.068Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file b/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file new file mode 100644 index 0000000..2648b33 --- /dev/null +++ b/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.090Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file b/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file new file mode 100644 index 0000000..91d72b5 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.057Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file b/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file new file mode 100644 index 0000000..bc14ab2 --- /dev/null +++ b/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.111Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file b/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file new file mode 100644 index 0000000..e0b5365 --- /dev/null +++ b/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file @@ -0,0 +1,63 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:00:33.726Z"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file b/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file new file mode 100644 index 0000000..0582d77 --- /dev/null +++ b/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.482Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file b/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file new file mode 100644 index 0000000..8850d72 --- /dev/null +++ b/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file @@ -0,0 +1,21 @@ +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.743Z"} The MIT License +Copyright 2024 (c) Total.js + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log new file mode 100644 index 0000000..fac4699 --- /dev/null +++ b/tests/filestorage/databases/fs-files/files.log @@ -0,0 +1,20 @@ +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T07:56:31.100Z","id":"IhSOn81cO61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.111Z","id":"IhSOn91dO60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.114Z","id":"IhSOn91eO61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.117Z","id":"IhSOn91fO60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:00:33.726Z","id":"IhSPQH1cY61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.737Z","id":"IhSPQH1dY60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.740Z","id":"IhSPQH1eY61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.743Z","id":"IhSPQH1fY60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:04:49.068Z","id":"IhSQ5S1cc61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.080Z","id":"IhSQ5S1dc60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.087Z","id":"IhSQ5S1ec61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.090Z","id":"IhSQ5S1fc60f"} +{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:24.049Z","id":"IhSQB61cb61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.057Z","id":"IhSQB61db60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.060Z","id":"IhSQB61eb61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.063Z","id":"IhSQB61fb60f"} +-"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:58.464Z","id":"IhSQGe1cb61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.476Z","id":"IhSQGe1db60f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.480Z","id":"IhSQGe1eb61f"} +{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.482Z","id":"IhSQGe1fb60f"} diff --git a/tests/filestorage/index.js b/tests/filestorage/index.js index 5e055aa..44ff91c 100644 --- a/tests/filestorage/index.js +++ b/tests/filestorage/index.js @@ -11,10 +11,12 @@ ON('ready', function() { var arr = []; var filestorage = FILESTORAGE(CONF.fs); var download; + var id; arr.push(function(resume) { RESTBuilder.POST(url + '/upload').file('logo', 'logo.svg', 'https://www.totaljs.com/download/IYsqOb1cr61f.svg').exec(function(err, response) { Test.print('FS - upload', err === null && response ? null : 'Failed to upload file'); download = url + response.url; + id = response.id; resume(); }); }); @@ -55,10 +57,25 @@ ON('ready', function() { arr.push(function(resume) { RESTBuilder.GET(download).callback(function(err, file, output) { - console.log(file, output); + Test.print('FS - Download', err === null && file ? null : 'Failed to download file'); resume(); }); }); + + arr.push(function(resume) { + RESTBuilder.GET(download).callback(function(err, file, output) { + Test.print('FS - Download', err === null && file ? null : 'Failed to download file'); + resume(); + }); + }); + + arr.push(function(resume) { + filestorage.remove(id, function(err) { + Test.print('FS - save - file', err === null ? null : 'Failed to remove file'); + resume(); + }); + }); + arr.async(next); }); From d17583cff5a2016dfa7dad8368564d6787358e9a Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 08:10:15 +0000 Subject: [PATCH 12/28] Clean code --- .../databases/fs-files/0439/IhSQ5S1dc60f.file | 21 ------- .../databases/fs-files/1139/IhSOn81cO61f.file | 63 ------------------- .../databases/fs-files/1806/IhSQB61eb61f.file | 21 ------- .../databases/fs-files/1862/IhSOn91eO61f.file | 21 ------- .../databases/fs-files/2680/IhSQGe1db60f.file | 21 ------- .../databases/fs-files/2921/IhSPQH1dY60f.file | 21 ------- .../databases/fs-files/3991/IhSQ5S1ec61f.file | 21 ------- .../databases/fs-files/4764/IhSQB61cb61f.file | 63 ------------------- .../databases/fs-files/5296/IhSQB61fb60f.file | 21 ------- .../databases/fs-files/5352/IhSOn91fO60f.file | 21 ------- .../databases/fs-files/6232/IhSQGe1eb61f.file | 21 ------- .../databases/fs-files/6473/IhSPQH1eY61f.file | 21 ------- .../databases/fs-files/6949/IhSQ5S1cc61f.file | 63 ------------------- .../databases/fs-files/7481/IhSQ5S1fc60f.file | 21 ------- .../databases/fs-files/8254/IhSQB61db60f.file | 21 ------- .../databases/fs-files/8310/IhSOn91dO60f.file | 21 ------- .../databases/fs-files/9431/IhSPQH1cY61f.file | 63 ------------------- .../databases/fs-files/9722/IhSQGe1fb60f.file | 21 ------- .../databases/fs-files/9963/IhSPQH1fY60f.file | 21 ------- .../filestorage/databases/fs-files/files.log | 20 ------ 20 files changed, 587 deletions(-) delete mode 100644 tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file delete mode 100644 tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file delete mode 100644 tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file delete mode 100644 tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file delete mode 100644 tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file delete mode 100644 tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file delete mode 100644 tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file delete mode 100644 tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file delete mode 100644 tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file delete mode 100644 tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file delete mode 100644 tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file delete mode 100644 tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file delete mode 100644 tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file delete mode 100644 tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file delete mode 100644 tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file delete mode 100644 tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file delete mode 100644 tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file delete mode 100644 tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file delete mode 100644 tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file delete mode 100644 tests/filestorage/databases/fs-files/files.log diff --git a/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file b/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file deleted file mode 100644 index b514648..0000000 --- a/tests/filestorage/databases/fs-files/0439/IhSQ5S1dc60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.080Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file b/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file deleted file mode 100644 index 44e8529..0000000 --- a/tests/filestorage/databases/fs-files/1139/IhSOn81cO61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T07:56:31.100Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file b/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file deleted file mode 100644 index 4f92f1a..0000000 --- a/tests/filestorage/databases/fs-files/1806/IhSQB61eb61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.060Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file b/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file deleted file mode 100644 index 1e95995..0000000 --- a/tests/filestorage/databases/fs-files/1862/IhSOn91eO61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.114Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file b/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file deleted file mode 100644 index 27a74ef..0000000 --- a/tests/filestorage/databases/fs-files/2680/IhSQGe1db60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.476Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file b/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file deleted file mode 100644 index 78ef9b9..0000000 --- a/tests/filestorage/databases/fs-files/2921/IhSPQH1dY60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.737Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file b/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file deleted file mode 100644 index ffe1c33..0000000 --- a/tests/filestorage/databases/fs-files/3991/IhSQ5S1ec61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.087Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file b/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file deleted file mode 100644 index 2b69974..0000000 --- a/tests/filestorage/databases/fs-files/4764/IhSQB61cb61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:24.049Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file b/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file deleted file mode 100644 index 15310a9..0000000 --- a/tests/filestorage/databases/fs-files/5296/IhSQB61fb60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.063Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file b/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file deleted file mode 100644 index 76ff659..0000000 --- a/tests/filestorage/databases/fs-files/5352/IhSOn91fO60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.117Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file b/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file deleted file mode 100644 index 83712bf..0000000 --- a/tests/filestorage/databases/fs-files/6232/IhSQGe1eb61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.480Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file b/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file deleted file mode 100644 index 076aff9..0000000 --- a/tests/filestorage/databases/fs-files/6473/IhSPQH1eY61f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.740Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file b/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file deleted file mode 100644 index e000031..0000000 --- a/tests/filestorage/databases/fs-files/6949/IhSQ5S1cc61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:04:49.068Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file b/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file deleted file mode 100644 index 2648b33..0000000 --- a/tests/filestorage/databases/fs-files/7481/IhSQ5S1fc60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.090Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file b/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file deleted file mode 100644 index 91d72b5..0000000 --- a/tests/filestorage/databases/fs-files/8254/IhSQB61db60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.057Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file b/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file deleted file mode 100644 index bc14ab2..0000000 --- a/tests/filestorage/databases/fs-files/8310/IhSOn91dO60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.111Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file b/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file deleted file mode 100644 index e0b5365..0000000 --- a/tests/filestorage/databases/fs-files/9431/IhSPQH1cY61f.file +++ /dev/null @@ -1,63 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:00:33.726Z"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file b/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file deleted file mode 100644 index 0582d77..0000000 --- a/tests/filestorage/databases/fs-files/9722/IhSQGe1fb60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.482Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file b/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file deleted file mode 100644 index 8850d72..0000000 --- a/tests/filestorage/databases/fs-files/9963/IhSPQH1fY60f.file +++ /dev/null @@ -1,21 +0,0 @@ -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.743Z"} The MIT License -Copyright 2024 (c) Total.js - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/tests/filestorage/databases/fs-files/files.log b/tests/filestorage/databases/fs-files/files.log deleted file mode 100644 index fac4699..0000000 --- a/tests/filestorage/databases/fs-files/files.log +++ /dev/null @@ -1,20 +0,0 @@ -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T07:56:31.100Z","id":"IhSOn81cO61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.111Z","id":"IhSOn91dO60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.114Z","id":"IhSOn91eO61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T07:56:31.117Z","id":"IhSOn91fO60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:00:33.726Z","id":"IhSPQH1cY61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.737Z","id":"IhSPQH1dY60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.740Z","id":"IhSPQH1eY61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:00:33.743Z","id":"IhSPQH1fY60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:04:49.068Z","id":"IhSQ5S1cc61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.080Z","id":"IhSQ5S1dc60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.087Z","id":"IhSQ5S1ec61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:04:49.090Z","id":"IhSQ5S1fc60f"} -{"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:24.049Z","id":"IhSQB61cb61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.057Z","id":"IhSQB61db60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.060Z","id":"IhSQB61eb61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:24.063Z","id":"IhSQB61fb60f"} --"name":"logo.svg","size":15884,"ext":"svg","custom":null,"type":"image/svg+xml","width":22,"height":425,"date":"2024-04-16T08:05:58.464Z","id":"IhSQGe1cb61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.476Z","id":"IhSQGe1db60f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.480Z","id":"IhSQGe1eb61f"} -{"name":"smallfile.txt","size":1086,"ext":"txt","custom":null,"type":"text/plain","date":"2024-04-16T08:05:58.482Z","id":"IhSQGe1fb60f"} From d8596c6afe4616be0940ee1cee412e44dbc6403b Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 08:31:18 +0000 Subject: [PATCH 13/28] Improved server test --- tests/filestorage/index.js | 1 - tests/server/index.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/filestorage/index.js b/tests/filestorage/index.js index 44ff91c..f02f0ed 100644 --- a/tests/filestorage/index.js +++ b/tests/filestorage/index.js @@ -54,7 +54,6 @@ ON('ready', function() { }); }); - arr.push(function(resume) { RESTBuilder.GET(download).callback(function(err, file, output) { Test.print('FS - Download', err === null && file ? null : 'Failed to download file'); diff --git a/tests/server/index.js b/tests/server/index.js index af9feef..8c57319 100644 --- a/tests/server/index.js +++ b/tests/server/index.js @@ -9,7 +9,7 @@ Test.push('Test Server', function(next) { var arr = []; // IP+PORT - arr.push(function(next_fn) { + arr.push(function(resume) { var options = {}; options.ip = '127.0.0.1'; options.port = 8000; @@ -18,14 +18,14 @@ Test.push('Test Server', function(next) { child.on('message', function() { RESTBuilder.GET('http://{0}:{1}/exit/'.format(options.ip, options.port)).exec(function(err, response) { Test.print('Port + Ip: ', err === null && response && response.success === true ? null : 'Expected sucess == true response from child server') - next_fn(); + resume(); }) }); }); }); // Unixsocket - arr.push(function(next_fn) { + arr.push(function(resume) { var options = {}; options.unixsocket = PATH.root('test.socket'); options.unixsocket777 = true; @@ -33,7 +33,7 @@ Test.push('Test Server', function(next) { var child2 = NEWTHREAD('child2', options); child2.on('message', function(message) { Test.print('UnixSocket :', message.unixsocket == options.unixsocket ? null : 'Expected valid Unixsocket'); - next_fn(); + resume(); }); }); From 5253fcba953afa2dd933bb7255d3784d6640a0f6 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 08:32:46 +0000 Subject: [PATCH 14/28] Removed useless comments --- tests/server/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/server/index.js b/tests/server/index.js index 8c57319..8092c4f 100644 --- a/tests/server/index.js +++ b/tests/server/index.js @@ -8,7 +8,6 @@ Test.push('Test Server', function(next) { var arr = []; - // IP+PORT arr.push(function(resume) { var options = {}; options.ip = '127.0.0.1'; @@ -24,7 +23,6 @@ Test.push('Test Server', function(next) { }); }); - // Unixsocket arr.push(function(resume) { var options = {}; options.unixsocket = PATH.root('test.socket'); From 8f2baab1553298ce73a2d5c29411145aed0db978 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Tue, 16 Apr 2024 17:57:55 +0000 Subject: [PATCH 15/28] Removed useless zip file --- tests/bundles/.src/app/controllers/default.js | 5 ++ tests/bundles/.src/app/myapp.bundle | 2 + tests/bundles/.src/bundle.json | 19 ++++++ tests/bundles/.src/controllers/default.js | 5 ++ tests/bundles/.src/index.js | 61 ++++++++++++++++++ tests/bundles/app/myapp.bundle | 1 - tests/bundles/bundles/myapp.bundle | 1 - tests/bundles/index.js | 40 ++++++------ tests/bundles/public/js/--ui.js | 1 + tests/tms.zip | Bin 4671 -> 0 bytes 10 files changed, 115 insertions(+), 20 deletions(-) create mode 100644 tests/bundles/.src/app/controllers/default.js create mode 100644 tests/bundles/.src/app/myapp.bundle create mode 100644 tests/bundles/.src/bundle.json create mode 100644 tests/bundles/.src/controllers/default.js create mode 100644 tests/bundles/.src/index.js create mode 100644 tests/bundles/public/js/--ui.js delete mode 100644 tests/tms.zip diff --git a/tests/bundles/.src/app/controllers/default.js b/tests/bundles/.src/app/controllers/default.js new file mode 100644 index 0000000..701b0e1 --- /dev/null +++ b/tests/bundles/.src/app/controllers/default.js @@ -0,0 +1,5 @@ +exports.install = function() { + ROUTE('GET /', function($) { + $.plain('Hello World'); + }); +}; \ No newline at end of file diff --git a/tests/bundles/.src/app/myapp.bundle b/tests/bundles/.src/app/myapp.bundle new file mode 100644 index 0000000..6b03420 --- /dev/null +++ b/tests/bundles/.src/app/myapp.bundle @@ -0,0 +1,2 @@ +/controllers/ : # +/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/.src/bundle.json b/tests/bundles/.src/bundle.json new file mode 100644 index 0000000..fa299d6 --- /dev/null +++ b/tests/bundles/.src/bundle.json @@ -0,0 +1,19 @@ +{ + "version": 1, + "created": "2024-04-16T17:56:19.711Z", + "total": "v5", + "node": "v16.20.2", + "files": [ + "/controllers/default.js", + "/index.js", + "/index.js.map", + "/app/myapp.bundle", + "/app/controllers/default.js" + ], + "skip": false, + "directories": [ + "/controllers/", + "/app/", + "/app/controllers/" + ] +} \ No newline at end of file diff --git a/tests/bundles/.src/controllers/default.js b/tests/bundles/.src/controllers/default.js new file mode 100644 index 0000000..701b0e1 --- /dev/null +++ b/tests/bundles/.src/controllers/default.js @@ -0,0 +1,5 @@ +exports.install = function() { + ROUTE('GET /', function($) { + $.plain('Hello World'); + }); +}; \ No newline at end of file diff --git a/tests/bundles/.src/index.js b/tests/bundles/.src/index.js new file mode 100644 index 0000000..dbb4426 --- /dev/null +++ b/tests/bundles/.src/index.js @@ -0,0 +1,61 @@ +/* eslint-disable */ +require('../../index'); +require('../../test'); + +// Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) +// Merging files +// Removing files + +// load web server and test app +CONF.$imprint = true; + +var url = 'http://localhost:8000'; +var filename = 'myapp.bundle'; +var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; + +F.run({ released: false }); + +Test.push('Bundles', function(next) { + var arr = []; + arr.push(function(resume) { + RESTBuilder.GET(url).exec(function(err, response) { + Test.print('From local', err === null ? null : 'App is not successfully started'); + resume(); + }); + }); + + arr.push(function(resume) { + PATH.mkdir(PATH.root('public/js')); + var file = 'console.log(window);'; + var filename = PATH.root('public/js/--ui.js'); + console.log(filename); + Total.Fs.writeFile(filename, file, function(err) { + if (err) + throw err; + Test.print('Write merge file', err == null ? null : 'Failed to write merge file'); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(res, output); + //Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); + }); + + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + + // arr.async(function() { + // next(); + // }); +}); + +setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/app/myapp.bundle b/tests/bundles/app/myapp.bundle index 39d11f0..6b03420 100644 --- a/tests/bundles/app/myapp.bundle +++ b/tests/bundles/app/myapp.bundle @@ -1,3 +1,2 @@ /controllers/ : # -/myapp.bundle : H4sIAAAAAAAAE9NPzs8rKcrPyUktKtZXoA2wUlDm0s+tTCwo0EsqzUvJSaWZPQDyHFnAzgAAAA== /controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/bundles/myapp.bundle b/tests/bundles/bundles/myapp.bundle index 39d11f0..6b03420 100644 --- a/tests/bundles/bundles/myapp.bundle +++ b/tests/bundles/bundles/myapp.bundle @@ -1,3 +1,2 @@ /controllers/ : # -/myapp.bundle : H4sIAAAAAAAAE9NPzs8rKcrPyUktKtZXoA2wUlDm0s+tTCwo0EsqzUvJSaWZPQDyHFnAzgAAAA== /controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 4bfb688..7c4e71f 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -9,49 +9,53 @@ require('../../test'); // load web server and test app CONF.$imprint = true; -var url = 'http://localhost:8000/'; +var url = 'http://localhost:8000'; var filename = 'myapp.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; +F.run({ released: false }); Test.push('Bundles', function(next) { var arr = []; arr.push(function(resume) { - RESTBuilder.GET(url).exec(function(err, response) { - console.log(err, response); Test.print('From local', err === null ? null : 'App is not successfully started'); - Total.Path.unlink(PATH.root('bundles/' + filename), function() { - Test.print('From local', err === null ? null : 'App is not successfully started'); - F.restart(); - resume(); - }); + resume(); }); }); arr.push(function(resume) { - var file = `exports.install = function() { - -ROUTE('GET /bundle/merge/', function($) { -$.plain('bundle is merged'); -});`; - var filename = Total.Path.controllers('--merge.js'); + PATH.mkdir(PATH.root('public/js')); + var file = 'console.log(window);'; + var filename = PATH.root('public/js/--ui.js'); console.log(filename); Total.Fs.writeFile(filename, file, function(err) { if (err) throw err; - + Test.print('Write merge file', err == null ? null : 'Failed to write merge file'); + resume(); }); - resume(); }); arr.push(function(resume) { - resume(); + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(res, output); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); }); + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + arr.async(function() { next(); }); }); -setTimeout(() => Test.run(), 600); +setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/public/js/--ui.js b/tests/bundles/public/js/--ui.js new file mode 100644 index 0000000..b420634 --- /dev/null +++ b/tests/bundles/public/js/--ui.js @@ -0,0 +1 @@ +console.log(window); \ No newline at end of file diff --git a/tests/tms.zip b/tests/tms.zip deleted file mode 100644 index 2d19cf5f6e8cc58ce5ade9e7e4047dbf5ed8e8d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4671 zcmdT{XIN9&77aB~gn%Z36h#CSkOUQbfgq?M1VRWc7J5k-S}0;eBGLpALX)Bb6D)v~ zND~`nU@WNf7zPHcASw)^;s`h>k9SWXqYxwbUiil2RP^xH^|bNH7u0IK;nu#QRz)ve`*K<1S5{BvT@<6m;$vqFEX4piMAI5x)0B!wDT_$`UH zlA9n|9AU<7-s1Yg=Uvh0xtpV(a;!YZTF$53@NA6>$C_C;Cz{&+`l2dt#a+~#cgXF# zyUb*6;rmztR%Df~Rvi7bULU8VFKb;z!CpfrdP8H(`#TK_P6QyeqpNO>-8u2We?weh zAS>Kt|A}#32WSfu<2H>i;&n5eO!`|i8a{U z2dE%XGO=|V)P6h|QDO_5^wxqF1+n3MJBrzR=SpP>iLBDB(|WRk=x`K|B% zd1B+PD^a!A^mXY9m|IO%ChyiWIQG(%_no%WN+C;7;w$6H?9&t9KmT~lG< zV%oDIFeXmio_l0bp|&4I1s#Jf=V^2qYo+x!9>_YcM!B8LeAAf9I$1V+J-{#_)`VV6 zM4q?njV3Box-5vUSG0A;#^|XBxfO`z%$Q%a+3 z_bE`%Fd-$b%DAE&>K8fqc4Sy%qAO~mx_xU|dr1ExuYKKhze`K%Kgr;%H@xWF(spc< z66tQucD++f^uC8%Ft2%<@8jAxtvWTT+H{Io+$L+L92MPyYX_F@2UqAQVIe!VL2F zp5G$_`7QUHmiDD0WX*0cGgll89G4<1)cK-QD?%OPx#rZ+$8{6?s2n$C z-y~XDMCZ>fZ#jBK_m5q4Bbzp8>YQlW?6a;dqVh+~g}>Auylwrk%`qvMz{A`RyqdU& zv#!lMdpKmFq}7OQK0%X3@OeXEXh#jtt5=`TTVy(_vqP)FjV`~4;XUxBsnce-IK*74 zIgIs>k|3Qq4e5P*E|lL6dDdQkK|_`{9{PuAmmQtB_tnMGhQp4YM^Ro)2Q^sFscODG zs@Tpx>X&@p(EIwv=Pqwu`n#JOZ^Udy`=C3vRa5QLovw8R%P88^moEMoKz=Q*uB=_P zulkg9s#3}GH`eC5JBd3U8OZTQ&A8r~0UjSNArHuREPuS;OT}eNe+4a@@cCJhZEZ_P z*wHu6FL}FaxWi~;+NGp^%B}^g?_IE!d1mUpglQ7?hPzt1|7L5YEB5&MAw}Qy_*WH) zM(n4HI-69?HmY*Fu;ty#<87g*f;bDSA8tZZj-(IE%^Ne0!tBHy8Xr1I53=BV(WvZ- zG|+pHFu2ytx!z~f4VS@O+H=X2zs#6AQPwwrU<3~7;fy5rWl(tn zIun)wF(sjiUIHE3MN&;w=>5`PBC zqER6qhUSg@Lc!}>>gy(2;mpY^iMAcql!v4ia^+l{&fOML2k}0+rKOxDmHbCm`=0QU z?)p5-`UixwmL-~u-iFKimkse(HP;wfEz>I3w6@91ieIzQsC0wTa$EdzBQ*{0`?f_4 zS$^@`B5~mH4-jL(nnDs2$4LD9>k0G~{um^H2~;iq;r`pp$|R!Tx&rtAz~u|ZAln4` zI9(8Db$Nlag}Z)$IRl#@BR0uasEQc{78F{MT@YXc-T)iU8{8-aV~}kRVNdh^&ie&C z3b2}R6ABudU~t*Gkn;K9v$g!9&~Ot8UjUcQmH27_v-Y&`D8P`yT_G@}g281QLB|#> zV0QKtjte{`+@AnXDHvRK+Z66>9VQ$Z_#3#p03BX1xa@rCNyY-?*|;4zI&dg(XEAd_ zw?T#je2|bk1^sIxa>w0JV8uQI{&kmfWw2<058^{H3$ZmZ6-4bFDwb)(J0_yK;?(mP*C{= ggUh}z2qR3 Date: Wed, 17 Apr 2024 10:33:09 +0000 Subject: [PATCH 16/28] Clean code --- tests/proxy/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/proxy/index.js b/tests/proxy/index.js index fe3d972..ea92562 100644 --- a/tests/proxy/index.js +++ b/tests/proxy/index.js @@ -42,7 +42,6 @@ PROXY('/cl/check/for_proxy/', 'https://flowstream.totalavengers.com/cl').check(f ON('ready', function() { Test.push('Test Web Proxy', function(next) { - // Test.print('String.slug()', [error]); var arr = []; var correct; From c3b8d31f946554f26cf28f982f798203585ffb36 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Mon, 20 May 2024 19:41:50 +0000 Subject: [PATCH 17/28] Added test for views: import and merge --- tests/views/controllers/default.js | 3 +++ tests/views/index.js | 10 ++++++++++ tests/views/public/css/a.css | 1 + tests/views/public/css/b.css | 1 + tests/views/public/js/a.js | 1 + tests/views/public/js/b.js | 1 + tests/views/views/import.html | 2 ++ 7 files changed, 19 insertions(+) create mode 100644 tests/views/public/css/a.css create mode 100644 tests/views/public/css/b.css create mode 100644 tests/views/public/js/a.js create mode 100644 tests/views/public/js/b.js create mode 100644 tests/views/views/import.html diff --git a/tests/views/controllers/default.js b/tests/views/controllers/default.js index 2ab84ae..8c1ef6c 100644 --- a/tests/views/controllers/default.js +++ b/tests/views/controllers/default.js @@ -72,6 +72,9 @@ function common_page($) { case 'static': view = 'static'; break; + case 'import': + view = 'import'; + break; case 'assignment': view = 'assignment'; break; diff --git a/tests/views/index.js b/tests/views/index.js index 4d715d2..7678771 100644 --- a/tests/views/index.js +++ b/tests/views/index.js @@ -174,6 +174,16 @@ ON('ready', function() { }); }); + arr.push(function(resume) { + input = url + '/view/common?cmd=import'; + + RESTBuilder.GET(input).exec(function(err, res, output) { + response = output.response; + Test.print('Import And Merge ', err == null && response.indexOf('-min.js') > -1 && response.indexOf('-min.css') > -1 ? null : 'Expected ' + correct); + resume(); + }); + }); + arr.async(next); }); diff --git a/tests/views/public/css/a.css b/tests/views/public/css/a.css new file mode 100644 index 0000000..dd0fc81 --- /dev/null +++ b/tests/views/public/css/a.css @@ -0,0 +1 @@ +.A {color: red}; \ No newline at end of file diff --git a/tests/views/public/css/b.css b/tests/views/public/css/b.css new file mode 100644 index 0000000..4496d04 --- /dev/null +++ b/tests/views/public/css/b.css @@ -0,0 +1 @@ +.B {color: green}; diff --git a/tests/views/public/js/a.js b/tests/views/public/js/a.js new file mode 100644 index 0000000..6298d20 --- /dev/null +++ b/tests/views/public/js/a.js @@ -0,0 +1 @@ +console.log('B.js'); diff --git a/tests/views/public/js/b.js b/tests/views/public/js/b.js new file mode 100644 index 0000000..77c6c28 --- /dev/null +++ b/tests/views/public/js/b.js @@ -0,0 +1 @@ +console.log('A.js'); \ No newline at end of file diff --git a/tests/views/views/import.html b/tests/views/views/import.html new file mode 100644 index 0000000..b47cd1d --- /dev/null +++ b/tests/views/views/import.html @@ -0,0 +1,2 @@ +@{layout('')} +@{import('a.js + b.js', 'a.css + b.css')} From 1d27196f8cd458f2107ef94164fb4cf0516be977 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Thu, 23 May 2024 09:24:46 +0000 Subject: [PATCH 18/28] Improved code --- tests/bundles/.src/bundle.json | 12 +++++++----- tests/bundles/.src/index.js | 8 ++++---- tests/bundles/.src/public/js/ui.js | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 tests/bundles/.src/public/js/ui.js diff --git a/tests/bundles/.src/bundle.json b/tests/bundles/.src/bundle.json index fa299d6..f625fbd 100644 --- a/tests/bundles/.src/bundle.json +++ b/tests/bundles/.src/bundle.json @@ -1,19 +1,21 @@ { "version": 1, - "created": "2024-04-16T17:56:19.711Z", + "created": "2024-05-20T19:43:54.426Z", "total": "v5", - "node": "v16.20.2", + "node": "v20.8.0", "files": [ "/controllers/default.js", "/index.js", - "/index.js.map", "/app/myapp.bundle", - "/app/controllers/default.js" + "/app/controllers/default.js", + "/public/js/ui.js" ], "skip": false, "directories": [ "/controllers/", "/app/", - "/app/controllers/" + "/public/", + "/app/controllers/", + "/public/js/" ] } \ No newline at end of file diff --git a/tests/bundles/.src/index.js b/tests/bundles/.src/index.js index dbb4426..7c4e71f 100644 --- a/tests/bundles/.src/index.js +++ b/tests/bundles/.src/index.js @@ -40,7 +40,7 @@ Test.push('Bundles', function(next) { arr.push(function(resume) { RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { console.log(res, output); - //Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); resume(); }); @@ -53,9 +53,9 @@ Test.push('Bundles', function(next) { // }); // }); - // arr.async(function() { - // next(); - // }); + arr.async(function() { + next(); + }); }); setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/.src/public/js/ui.js b/tests/bundles/.src/public/js/ui.js new file mode 100644 index 0000000..caf55c8 --- /dev/null +++ b/tests/bundles/.src/public/js/ui.js @@ -0,0 +1,2 @@ + +console.log(window); \ No newline at end of file From 3798b680c715710d54ad5bbdcf042d4d7c365580 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Thu, 23 May 2024 12:02:47 +0000 Subject: [PATCH 19/28] updated bundles test --- tests/bundles/.src/app/controllers/default.js | 37 ++++++++++- tests/bundles/.src/app/definitions/worker.js | 5 ++ tests/bundles/.src/app/myapp.bundle | 2 - tests/bundles/.src/bundle.json | 18 ++++-- tests/bundles/.src/controllers/default.js | 37 ++++++++++- tests/bundles/.src/definitions/worker.js | 5 ++ tests/bundles/.src/index.js | 53 ++-------------- tests/bundles/.src/public/js/ui.js | 2 - tests/bundles/.src/run.js | 63 +++++++++++++++++++ tests/bundles/app/controllers/default.js | 37 ++++++++++- tests/bundles/app/myapp.bundle | 2 - tests/bundles/bundles/app.bundle | 4 ++ tests/bundles/bundles/myapp.bundle | 2 - tests/bundles/index.js | 53 ++-------------- tests/bundles/public/js/--ui.js | 1 - tests/bundles/run.js | 62 ++++++++++++++++++ tests/routing/controllers/sockets.js | 1 + 17 files changed, 271 insertions(+), 113 deletions(-) create mode 100644 tests/bundles/.src/app/definitions/worker.js delete mode 100644 tests/bundles/.src/app/myapp.bundle create mode 100644 tests/bundles/.src/definitions/worker.js delete mode 100644 tests/bundles/.src/public/js/ui.js create mode 100644 tests/bundles/.src/run.js delete mode 100644 tests/bundles/app/myapp.bundle create mode 100644 tests/bundles/bundles/app.bundle delete mode 100644 tests/bundles/bundles/myapp.bundle delete mode 100644 tests/bundles/public/js/--ui.js create mode 100644 tests/bundles/run.js diff --git a/tests/bundles/.src/app/controllers/default.js b/tests/bundles/.src/app/controllers/default.js index 701b0e1..601fe3e 100644 --- a/tests/bundles/.src/app/controllers/default.js +++ b/tests/bundles/.src/app/controllers/default.js @@ -2,4 +2,39 @@ exports.install = function() { ROUTE('GET /', function($) { $.plain('Hello World'); }); -}; \ No newline at end of file + + ROUTE('POST /bundles/merge/', function($) { + var payload = $.body; + if (!payload.content || !payload.filename) { + $.invalid('Missing important body parameters filename and content'); + return; + } + + + PATH.mkdir(PATH.root('public/js')); + Total.Fs.writeFile(payload.filename, payload.content, function(err) { + if (err) + throw err; + $.json({ success: true, value: payload.filename }); + }); + }); + + ROUTE('GET /bundles/remove/', function($) { + var query = $.query; + if (!query.filename) { + $.invalid('[filename] is required in query parameters'); + return; + } + + PATH.unlink(query.filename, function(error) { + if (error) { + $.invalid(error); + return; + } + + + $.json({ success: true, value: query.filename }); + }); + }); + +} \ No newline at end of file diff --git a/tests/bundles/.src/app/definitions/worker.js b/tests/bundles/.src/app/definitions/worker.js new file mode 100644 index 0000000..ef3ecdc --- /dev/null +++ b/tests/bundles/.src/app/definitions/worker.js @@ -0,0 +1,5 @@ +var worker = NEWTHREAD(); + +ON('ready', function() { + worker.postMessage('ready'); +}); \ No newline at end of file diff --git a/tests/bundles/.src/app/myapp.bundle b/tests/bundles/.src/app/myapp.bundle deleted file mode 100644 index 6b03420..0000000 --- a/tests/bundles/.src/app/myapp.bundle +++ /dev/null @@ -1,2 +0,0 @@ -/controllers/ : # -/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/.src/bundle.json b/tests/bundles/.src/bundle.json index f625fbd..5e0d68d 100644 --- a/tests/bundles/.src/bundle.json +++ b/tests/bundles/.src/bundle.json @@ -1,21 +1,29 @@ { "version": 1, - "created": "2024-05-20T19:43:54.426Z", + "created": "2024-05-23T11:41:07.462Z", "total": "v5", "node": "v20.8.0", "files": [ + "/.DS_Store", + "/controllers/.DS_Store", "/controllers/default.js", + "/definitions/worker.js", "/index.js", - "/app/myapp.bundle", + "/index.js.map", + "/run.js", + "/run.js.json", + "/run.js.map", + "/app/.DS_Store", + "/app/controllers/.DS_Store", "/app/controllers/default.js", - "/public/js/ui.js" + "/app/definitions/worker.js" ], "skip": false, "directories": [ "/controllers/", + "/definitions/", "/app/", - "/public/", "/app/controllers/", - "/public/js/" + "/app/definitions/" ] } \ No newline at end of file diff --git a/tests/bundles/.src/controllers/default.js b/tests/bundles/.src/controllers/default.js index 701b0e1..601fe3e 100644 --- a/tests/bundles/.src/controllers/default.js +++ b/tests/bundles/.src/controllers/default.js @@ -2,4 +2,39 @@ exports.install = function() { ROUTE('GET /', function($) { $.plain('Hello World'); }); -}; \ No newline at end of file + + ROUTE('POST /bundles/merge/', function($) { + var payload = $.body; + if (!payload.content || !payload.filename) { + $.invalid('Missing important body parameters filename and content'); + return; + } + + + PATH.mkdir(PATH.root('public/js')); + Total.Fs.writeFile(payload.filename, payload.content, function(err) { + if (err) + throw err; + $.json({ success: true, value: payload.filename }); + }); + }); + + ROUTE('GET /bundles/remove/', function($) { + var query = $.query; + if (!query.filename) { + $.invalid('[filename] is required in query parameters'); + return; + } + + PATH.unlink(query.filename, function(error) { + if (error) { + $.invalid(error); + return; + } + + + $.json({ success: true, value: query.filename }); + }); + }); + +} \ No newline at end of file diff --git a/tests/bundles/.src/definitions/worker.js b/tests/bundles/.src/definitions/worker.js new file mode 100644 index 0000000..ef3ecdc --- /dev/null +++ b/tests/bundles/.src/definitions/worker.js @@ -0,0 +1,5 @@ +var worker = NEWTHREAD(); + +ON('ready', function() { + worker.postMessage('ready'); +}); \ No newline at end of file diff --git a/tests/bundles/.src/index.js b/tests/bundles/.src/index.js index 7c4e71f..653a30e 100644 --- a/tests/bundles/.src/index.js +++ b/tests/bundles/.src/index.js @@ -1,6 +1,7 @@ /* eslint-disable */ require('../../index'); require('../../test'); +var worker = NEWTHREAD(); // Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) // Merging files @@ -8,54 +9,10 @@ require('../../test'); // load web server and test app CONF.$imprint = true; +F.run({ release: false, port: 3000 }); +ON('ready', function() { + worker.postMessage({ ready: true }); +}); -var url = 'http://localhost:8000'; -var filename = 'myapp.bundle'; -var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; - -F.run({ released: false }); - -Test.push('Bundles', function(next) { - var arr = []; - arr.push(function(resume) { - RESTBuilder.GET(url).exec(function(err, response) { - Test.print('From local', err === null ? null : 'App is not successfully started'); - resume(); - }); - }); - - arr.push(function(resume) { - PATH.mkdir(PATH.root('public/js')); - var file = 'console.log(window);'; - var filename = PATH.root('public/js/--ui.js'); - console.log(filename); - Total.Fs.writeFile(filename, file, function(err) { - if (err) - throw err; - Test.print('Write merge file', err == null ? null : 'Failed to write merge file'); - resume(); - }); - }); - - arr.push(function(resume) { - RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(res, output); - Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - - resume(); - }); - }); - - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); - arr.async(function() { - next(); - }); -}); -setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/.src/public/js/ui.js b/tests/bundles/.src/public/js/ui.js deleted file mode 100644 index caf55c8..0000000 --- a/tests/bundles/.src/public/js/ui.js +++ /dev/null @@ -1,2 +0,0 @@ - -console.log(window); \ No newline at end of file diff --git a/tests/bundles/.src/run.js b/tests/bundles/.src/run.js new file mode 100644 index 0000000..cc8c1a1 --- /dev/null +++ b/tests/bundles/.src/run.js @@ -0,0 +1,63 @@ +/* eslint-disable */ +require('../../index'); +require('../../test'); + +// Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) +// Merging files +// Removing files + +// load web server and test app +CONF.$imprint = true; + +var url = 'http://localhost:3000/'; +var filename = 'myapp.bundle'; +var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; +F.run({ release: false, port: 5000 }); +ON('ready', function() { + console.log('nodejs'); + Test.push('Bundles', function(next) { + var arr = []; + arr.push(async function(resume) { + var child = NEWTHREAD('~./index.js'); + console.log(child); + child.on('message', function(msg) { + console.log(msg); + RESTBuilder.GET(url).exec(function(err, response) { + Test.print('From local', err === null ? null : 'App is not successfully started'); + setTimeout(() => resume(), 3000); + }); + }); + }); + + arr.push(function(resume) { + var file = 'console.log(window);'; + var filename = PATH.root('public/js/--ui.js'); + RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { + console.log(err, res, out); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(err, res, output); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); + }); + + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + + arr.async(function() { + next(); + }); + }); + setTimeout(() => Test.run(), 1000); +}); + diff --git a/tests/bundles/app/controllers/default.js b/tests/bundles/app/controllers/default.js index 701b0e1..601fe3e 100644 --- a/tests/bundles/app/controllers/default.js +++ b/tests/bundles/app/controllers/default.js @@ -2,4 +2,39 @@ exports.install = function() { ROUTE('GET /', function($) { $.plain('Hello World'); }); -}; \ No newline at end of file + + ROUTE('POST /bundles/merge/', function($) { + var payload = $.body; + if (!payload.content || !payload.filename) { + $.invalid('Missing important body parameters filename and content'); + return; + } + + + PATH.mkdir(PATH.root('public/js')); + Total.Fs.writeFile(payload.filename, payload.content, function(err) { + if (err) + throw err; + $.json({ success: true, value: payload.filename }); + }); + }); + + ROUTE('GET /bundles/remove/', function($) { + var query = $.query; + if (!query.filename) { + $.invalid('[filename] is required in query parameters'); + return; + } + + PATH.unlink(query.filename, function(error) { + if (error) { + $.invalid(error); + return; + } + + + $.json({ success: true, value: query.filename }); + }); + }); + +} \ No newline at end of file diff --git a/tests/bundles/app/myapp.bundle b/tests/bundles/app/myapp.bundle deleted file mode 100644 index 6b03420..0000000 --- a/tests/bundles/app/myapp.bundle +++ /dev/null @@ -1,2 +0,0 @@ -/controllers/ : # -/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/bundles/app.bundle b/tests/bundles/bundles/app.bundle new file mode 100644 index 0000000..8a88071 --- /dev/null +++ b/tests/bundles/bundles/app.bundle @@ -0,0 +1,4 @@ +/controllers/ : # +/.DS_Store : H4sIAAAAAAAAE+2YTU7DMBBGvwlBitSNl0hsfAR6A1OFE1TsURIECxdXFPa+BVfgIpwL4vorFIUg2FAK8yLrWfLYmXjhnwCQ2X03BQyACtmSKh9QsQwo6MPUeT3GLQJ8/1z2tf0g5T5B2+d9g7t3+a+6VeubELyMh/ir6bwNi2Ue6/h8PHIR6rrxocF6LuPD4/PT6WfR3Teil9fbWZz89BQqiqIoe4ZkVZPdpqEoyi8krQ+WdnTMFrYXdLnVx9CWdnTMFsYVdElXtKEt7eiYzUVLePkQvnlzeRFDW9p9/XsV5T9xkGXS/n82fv9XFOUPI2U9r2d4vRAMSHut7cvFpgO4m2N4CCjyz8IjvLVb2tExWw8CirIrXgAKwfmKBBgAAA== +/controllers/.DS_Store : H4sIAAAAAAAAE+3YPQrCMBjG8eeNGQIuGR2zeABvEEp7Ai/g4BXcc3Qt74MEasGtRZ8flH+g30vbFIANj/sFyAASvDjjo8RlIXRj4zFERERk38yTjttehojs0Px8KGxlm9e4PrCx2yezha1s8xq3C2xkE5vZwla2efnQMk4+jGc2zlAss4Wt39+vyD85ePL8/p+wOv8XkR9mcbyOA94TguUGr+XWjRvWPwKC/yw8dfsWtrLNqw8Bka08AWoAiG0EGAAA +/controllers/default.js : H4sIAAAAAAAAE4VRy07DMBA8u1+xSJXiSii9U3HgUOCCQFDEAXFwky0sOHZZ24WK5t9x3DZ9UECRIq/XO7Mzg59Ty97lZJxXWsMpTIIpPFkje/DVEbfX96OhzC6GI+hnx5tmN3VFN59qRUZml6i1hQfLusx6g46o46+dvrm+i+PjYEqNrl8hP+MhsJlimKq5tqqMe3TzsS3nEUrQBOTRqpEX1ng0HhYLaO8mpNGoCpcwcSkyM6WplNkVOUfmGahqZKo414BGFo7PPbKD9SwoU8IKPCkQgtEHNs2x7ojmEzdno8u8eiuJZTqytV5m0zDWVPRfXdZLgyMbrczPXf7B5PE8Esj9TY9hT8+WG8i8EtIIb6rmLPwL2w+I5WCp8dXFt1/gQlGgcyfgOUTYqDvgCezzQZ02q9fRiN1k19EwVnb2azbvAXmekkmnNppU/RHC47r1BOSA8T0QYwlkVoibNA4bv7Q9GE3mTe6S7dpm94xr661tlteJZounTfg/Y3fpf9pafwOqfZHjUQMAAA== diff --git a/tests/bundles/bundles/myapp.bundle b/tests/bundles/bundles/myapp.bundle deleted file mode 100644 index 6b03420..0000000 --- a/tests/bundles/bundles/myapp.bundle +++ /dev/null @@ -1,2 +0,0 @@ -/controllers/ : # -/controllers/default.js : H4sIAAAAAAAAE0utKMgvKinWy8wrLknMyVGwVUgrzUsuyczP09BUqObiDPIPDXHVUHd3DVHQV9dBSKqAZTlV9ApyEjPzNNQ9UnNy8hXC84tyUtQ1rbk4a4FErTUAafcy5V4AAAA= diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 7c4e71f..653a30e 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -1,6 +1,7 @@ /* eslint-disable */ require('../../index'); require('../../test'); +var worker = NEWTHREAD(); // Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) // Merging files @@ -8,54 +9,10 @@ require('../../test'); // load web server and test app CONF.$imprint = true; +F.run({ release: false, port: 3000 }); +ON('ready', function() { + worker.postMessage({ ready: true }); +}); -var url = 'http://localhost:8000'; -var filename = 'myapp.bundle'; -var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; - -F.run({ released: false }); - -Test.push('Bundles', function(next) { - var arr = []; - arr.push(function(resume) { - RESTBuilder.GET(url).exec(function(err, response) { - Test.print('From local', err === null ? null : 'App is not successfully started'); - resume(); - }); - }); - - arr.push(function(resume) { - PATH.mkdir(PATH.root('public/js')); - var file = 'console.log(window);'; - var filename = PATH.root('public/js/--ui.js'); - console.log(filename); - Total.Fs.writeFile(filename, file, function(err) { - if (err) - throw err; - Test.print('Write merge file', err == null ? null : 'Failed to write merge file'); - resume(); - }); - }); - - arr.push(function(resume) { - RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(res, output); - Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - - resume(); - }); - }); - - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); - arr.async(function() { - next(); - }); -}); -setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/public/js/--ui.js b/tests/bundles/public/js/--ui.js deleted file mode 100644 index b420634..0000000 --- a/tests/bundles/public/js/--ui.js +++ /dev/null @@ -1 +0,0 @@ -console.log(window); \ No newline at end of file diff --git a/tests/bundles/run.js b/tests/bundles/run.js new file mode 100644 index 0000000..3683bcc --- /dev/null +++ b/tests/bundles/run.js @@ -0,0 +1,62 @@ +/* eslint-disable */ +require('../../index'); +require('../../test'); + +// Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) +// Merging files +// Removing files + +// load web server and test app +CONF.$imprint = true; + +var url = 'http://localhost:3000/'; +var filename = 'myapp.bundle'; +var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; +F.run({ release: false, port: 5000 }); +ON('ready', function() { + console.log('nodejs'); + Test.push('Bundles', function(next) { + var arr = []; + arr.push(async function(resume) { + var child = NEWTHREAD('~./index.js'); + console.log(child); + child.on('message', function(msg) { + RESTBuilder.GET(url).exec(function(err, response) { + Test.print('From local', err === null ? null : 'App is not successfully started'); + setTimeout(() => resume(), 3000); + }); + }); + }); + + arr.push(function(resume) { + var file = 'console.log(window);'; + var filename = PATH.root('public/js/--ui.js'); + RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { + console.log(err, res, out); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(err, res, output); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); + }); + + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + + arr.async(function() { + next(); + }); + }); + setTimeout(() => Test.run(), 1000); +}); + diff --git a/tests/routing/controllers/sockets.js b/tests/routing/controllers/sockets.js index 2224acf..71e8e1d 100644 --- a/tests/routing/controllers/sockets.js +++ b/tests/routing/controllers/sockets.js @@ -95,6 +95,7 @@ function text() { self.on('message', function(client, message) { + console.log(message); // Convert switch (message.type) { case 'Buffer': From 2c8318c9fc3e48f80a415da73ca3a9dd09c81968 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Sun, 26 May 2024 10:16:27 +0000 Subject: [PATCH 20/28] Removed unexpected file --- tests/bundles/.src/app/definitions/worker.js | 5 -- tests/bundles/.src/app/public/ui.js | 1 + tests/bundles/.src/bundle.json | 12 ++- tests/bundles/.src/definitions/worker.js | 5 -- tests/bundles/.src/index.js | 5 +- tests/bundles/.src/public/js/--ui.js | 1 + tests/bundles/.src/public/ui.js | 1 + tests/bundles/.src/run.js | 87 ++++++++++---------- tests/bundles/app/public/ui.js | 1 + tests/bundles/bundles/app.bundle | 2 + tests/bundles/index.js | 5 +- tests/bundles/run.js | 86 ++++++++++--------- 12 files changed, 103 insertions(+), 108 deletions(-) delete mode 100644 tests/bundles/.src/app/definitions/worker.js create mode 100644 tests/bundles/.src/app/public/ui.js delete mode 100644 tests/bundles/.src/definitions/worker.js create mode 100644 tests/bundles/.src/public/js/--ui.js create mode 100644 tests/bundles/.src/public/ui.js create mode 100644 tests/bundles/app/public/ui.js diff --git a/tests/bundles/.src/app/definitions/worker.js b/tests/bundles/.src/app/definitions/worker.js deleted file mode 100644 index ef3ecdc..0000000 --- a/tests/bundles/.src/app/definitions/worker.js +++ /dev/null @@ -1,5 +0,0 @@ -var worker = NEWTHREAD(); - -ON('ready', function() { - worker.postMessage('ready'); -}); \ No newline at end of file diff --git a/tests/bundles/.src/app/public/ui.js b/tests/bundles/.src/app/public/ui.js new file mode 100644 index 0000000..7a19f7d --- /dev/null +++ b/tests/bundles/.src/app/public/ui.js @@ -0,0 +1 @@ +console.log('Total.js UI'); \ No newline at end of file diff --git a/tests/bundles/.src/bundle.json b/tests/bundles/.src/bundle.json index 5e0d68d..8f08d91 100644 --- a/tests/bundles/.src/bundle.json +++ b/tests/bundles/.src/bundle.json @@ -1,29 +1,27 @@ { "version": 1, - "created": "2024-05-23T11:41:07.462Z", + "created": "2024-05-23T14:53:52.274Z", "total": "v5", "node": "v20.8.0", "files": [ "/.DS_Store", "/controllers/.DS_Store", "/controllers/default.js", - "/definitions/worker.js", + "/public/ui.js", "/index.js", "/index.js.map", "/run.js", - "/run.js.json", - "/run.js.map", "/app/.DS_Store", "/app/controllers/.DS_Store", "/app/controllers/default.js", - "/app/definitions/worker.js" + "/app/public/ui.js" ], "skip": false, "directories": [ "/controllers/", - "/definitions/", + "/public/", "/app/", "/app/controllers/", - "/app/definitions/" + "/app/public/" ] } \ No newline at end of file diff --git a/tests/bundles/.src/definitions/worker.js b/tests/bundles/.src/definitions/worker.js deleted file mode 100644 index ef3ecdc..0000000 --- a/tests/bundles/.src/definitions/worker.js +++ /dev/null @@ -1,5 +0,0 @@ -var worker = NEWTHREAD(); - -ON('ready', function() { - worker.postMessage('ready'); -}); \ No newline at end of file diff --git a/tests/bundles/.src/index.js b/tests/bundles/.src/index.js index 653a30e..81343b0 100644 --- a/tests/bundles/.src/index.js +++ b/tests/bundles/.src/index.js @@ -9,9 +9,12 @@ var worker = NEWTHREAD(); // load web server and test app CONF.$imprint = true; -F.run({ release: false, port: 3000 }); +F.run({ release: true, port: 3000 }); ON('ready', function() { + DEBUG = true; + setTimeout( function() { worker.postMessage({ ready: true }); + }, 3000); }); diff --git a/tests/bundles/.src/public/js/--ui.js b/tests/bundles/.src/public/js/--ui.js new file mode 100644 index 0000000..b420634 --- /dev/null +++ b/tests/bundles/.src/public/js/--ui.js @@ -0,0 +1 @@ +console.log(window); \ No newline at end of file diff --git a/tests/bundles/.src/public/ui.js b/tests/bundles/.src/public/ui.js new file mode 100644 index 0000000..7a19f7d --- /dev/null +++ b/tests/bundles/.src/public/ui.js @@ -0,0 +1 @@ +console.log('Total.js UI'); \ No newline at end of file diff --git a/tests/bundles/.src/run.js b/tests/bundles/.src/run.js index cc8c1a1..2ba0809 100644 --- a/tests/bundles/.src/run.js +++ b/tests/bundles/.src/run.js @@ -12,52 +12,49 @@ CONF.$imprint = true; var url = 'http://localhost:3000/'; var filename = 'myapp.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; -F.run({ release: false, port: 5000 }); -ON('ready', function() { - console.log('nodejs'); - Test.push('Bundles', function(next) { - var arr = []; - arr.push(async function(resume) { - var child = NEWTHREAD('~./index.js'); - console.log(child); - child.on('message', function(msg) { - console.log(msg); - RESTBuilder.GET(url).exec(function(err, response) { - Test.print('From local', err === null ? null : 'App is not successfully started'); - setTimeout(() => resume(), 3000); - }); + +Test.push('Bundles', function(next) { + var arr = []; + arr.push(async function(resume) { + var child = NEWTHREAD('~./index.js'); + child.on('message', function(msg) { + console.log('message', msg); + RESTBuilder.GET(url).exec(function(err, response) { + console.log(err, response); + Test.print('From local', err === null ? null : 'App is not successfully started'); + resume() }); - }); - - arr.push(function(resume) { - var file = 'console.log(window);'; - var filename = PATH.root('public/js/--ui.js'); - RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { - console.log(err, res, out); - resume(); }); - }); - - arr.push(function(resume) { - RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(err, res, output); - Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - - resume(); - }); - }); - - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); - - arr.async(function() { - next(); - }); - }); - setTimeout(() => Test.run(), 1000); + }); + + arr.push(function(resume) { + var file = 'console.log(window);'; + var filename = PATH.root('/.src/public/js/--ui.js'); + RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { + console.log(err, res, out); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(err, res); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); + }); + + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + + arr.async(function() { + next(); + }); }); +setTimeout(() => Test.run(), 1000); diff --git a/tests/bundles/app/public/ui.js b/tests/bundles/app/public/ui.js new file mode 100644 index 0000000..7a19f7d --- /dev/null +++ b/tests/bundles/app/public/ui.js @@ -0,0 +1 @@ +console.log('Total.js UI'); \ No newline at end of file diff --git a/tests/bundles/bundles/app.bundle b/tests/bundles/bundles/app.bundle index 8a88071..1024655 100644 --- a/tests/bundles/bundles/app.bundle +++ b/tests/bundles/bundles/app.bundle @@ -1,4 +1,6 @@ /controllers/ : # +/public/ : # /.DS_Store : H4sIAAAAAAAAE+2YTU7DMBBGvwlBitSNl0hsfAR6A1OFE1TsURIECxdXFPa+BVfgIpwL4vorFIUg2FAK8yLrWfLYmXjhnwCQ2X03BQyACtmSKh9QsQwo6MPUeT3GLQJ8/1z2tf0g5T5B2+d9g7t3+a+6VeubELyMh/ir6bwNi2Ue6/h8PHIR6rrxocF6LuPD4/PT6WfR3Teil9fbWZz89BQqiqIoe4ZkVZPdpqEoyi8krQ+WdnTMFrYXdLnVx9CWdnTMFsYVdElXtKEt7eiYzUVLePkQvnlzeRFDW9p9/XsV5T9xkGXS/n82fv9XFOUPI2U9r2d4vRAMSHut7cvFpgO4m2N4CCjyz8IjvLVb2tExWw8CirIrXgAKwfmKBBgAAA== /controllers/.DS_Store : H4sIAAAAAAAAE+3YPQrCMBjG8eeNGQIuGR2zeABvEEp7Ai/g4BXcc3Qt74MEasGtRZ8flH+g30vbFIANj/sFyAASvDjjo8RlIXRj4zFERERk38yTjttehojs0Px8KGxlm9e4PrCx2yezha1s8xq3C2xkE5vZwla2efnQMk4+jGc2zlAss4Wt39+vyD85ePL8/p+wOv8XkR9mcbyOA94TguUGr+XWjRvWPwKC/yw8dfsWtrLNqw8Bka08AWoAiG0EGAAA /controllers/default.js : H4sIAAAAAAAAE4VRy07DMBA8u1+xSJXiSii9U3HgUOCCQFDEAXFwky0sOHZZ24WK5t9x3DZ9UECRIq/XO7Mzg59Ty97lZJxXWsMpTIIpPFkje/DVEbfX96OhzC6GI+hnx5tmN3VFN59qRUZml6i1hQfLusx6g46o46+dvrm+i+PjYEqNrl8hP+MhsJlimKq5tqqMe3TzsS3nEUrQBOTRqpEX1ng0HhYLaO8mpNGoCpcwcSkyM6WplNkVOUfmGahqZKo414BGFo7PPbKD9SwoU8IKPCkQgtEHNs2x7ojmEzdno8u8eiuJZTqytV5m0zDWVPRfXdZLgyMbrczPXf7B5PE8Esj9TY9hT8+WG8i8EtIIb6rmLPwL2w+I5WCp8dXFt1/gQlGgcyfgOUTYqDvgCezzQZ02q9fRiN1k19EwVnb2azbvAXmekkmnNppU/RHC47r1BOSA8T0QYwlkVoibNA4bv7Q9GE3mTe6S7dpm94xr661tlteJZounTfg/Y3fpf9pafwOqfZHjUQMAAA== +/public/ui.js : H4sIAAAAAAAAE0vOzyvOz0nVy8lP11APyS9JzNHLKlYI9VTXtAYA+drsIhsAAAA= diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 653a30e..81343b0 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -9,9 +9,12 @@ var worker = NEWTHREAD(); // load web server and test app CONF.$imprint = true; -F.run({ release: false, port: 3000 }); +F.run({ release: true, port: 3000 }); ON('ready', function() { + DEBUG = true; + setTimeout( function() { worker.postMessage({ ready: true }); + }, 3000); }); diff --git a/tests/bundles/run.js b/tests/bundles/run.js index 3683bcc..2ba0809 100644 --- a/tests/bundles/run.js +++ b/tests/bundles/run.js @@ -12,51 +12,49 @@ CONF.$imprint = true; var url = 'http://localhost:3000/'; var filename = 'myapp.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; -F.run({ release: false, port: 5000 }); -ON('ready', function() { - console.log('nodejs'); - Test.push('Bundles', function(next) { - var arr = []; - arr.push(async function(resume) { - var child = NEWTHREAD('~./index.js'); - console.log(child); - child.on('message', function(msg) { - RESTBuilder.GET(url).exec(function(err, response) { - Test.print('From local', err === null ? null : 'App is not successfully started'); - setTimeout(() => resume(), 3000); - }); + +Test.push('Bundles', function(next) { + var arr = []; + arr.push(async function(resume) { + var child = NEWTHREAD('~./index.js'); + child.on('message', function(msg) { + console.log('message', msg); + RESTBuilder.GET(url).exec(function(err, response) { + console.log(err, response); + Test.print('From local', err === null ? null : 'App is not successfully started'); + resume() }); - }); - - arr.push(function(resume) { - var file = 'console.log(window);'; - var filename = PATH.root('public/js/--ui.js'); - RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { - console.log(err, res, out); - resume(); }); - }); - - arr.push(function(resume) { - RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(err, res, output); - Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - - resume(); - }); - }); - - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); - - arr.async(function() { - next(); - }); - }); - setTimeout(() => Test.run(), 1000); + }); + + arr.push(function(resume) { + var file = 'console.log(window);'; + var filename = PATH.root('/.src/public/js/--ui.js'); + RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { + console.log(err, res, out); + resume(); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { + console.log(err, res); + Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); + + resume(); + }); + }); + + // arr.push(function(resume) { + // PATH.unlink(PATH.root('bundles/' + filename), function() { + // Test.print('From local', err === null ? null : 'App is not successfully started'); + // resume(); + // }); + // }); + + arr.async(function() { + next(); + }); }); +setTimeout(() => Test.run(), 1000); From 328273ea7ff6c61a59112a80747fae9e06a18307 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 10 Jul 2024 09:13:28 -0400 Subject: [PATCH 21/28] Fixed minificator test: multiline string --- tests/minificators/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/minificators/index.js b/tests/minificators/index.js index c289774..25b0a84 100644 --- a/tests/minificators/index.js +++ b/tests/minificators/index.js @@ -31,11 +31,10 @@ Test.push('Minifactors', function(next) { }); arr.push(function(resume) { - correct = 'var arr=[1,2,3,4,5,6,7,8];arr.wait(function(item){console.log(item)},function(){console.log(data)});'; - Total.Fs.readFile(PATH.public('script_multiline_string.js'), function(err, data) { - if (data) - value = data.toString(); - var response = U.minify_js(value); + correct = 'var arr=[1,2,3,4,5,6,7,8],html=`

\nThis is just a good job\n

`;arr.wait(function(item){console.log(item)},function(){console.log(html)});'; + Total.Fs.readFile(PATH.public('script_multiline_string.js'), 'utf8', function(err, data) { + var response = U.minify_js(data); + console.log(response); Test.print('Minify - JS (Multiline String)', response !== null && response === correct ? null : 'Something went rong'); resume(); }); From a5a28149874d7d13ade9b7adc78e0fd116ff745a Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 10 Jul 2024 10:21:23 -0400 Subject: [PATCH 22/28] Fixed datauri --- tests/schemas/index.js | 6 ++++-- tests/schemas/schemas/schema-formatting.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/schemas/index.js b/tests/schemas/index.js index e3aeac8..3a099ce 100644 --- a/tests/schemas/index.js +++ b/tests/schemas/index.js @@ -118,7 +118,7 @@ ON('ready', function () { string_capitalize2: { i: 'only first', o: 'Only first' }, string_lowercase: { i: 'LoWEr cAse', o: 'lower case' }, string_uppercase: { i: 'UPper CaSe', o: 'UPPER CASE' }, - datauri: { i: datauri, o: datauri }, + datauri: { i: datauri, o: 'image/png' }, zip: { i: '23432', o: '23432' }, icon: { i: 'ti ti-user', o: 'ti ti-user' }, color: { i: '#68B25B', o: '#68B25B' }, @@ -139,7 +139,8 @@ ON('ready', function () { RESTBuilder.POST(url + '/schema/formatting/', body).exec(function (err, res, output) { console.log(res, output); for (var key in data) - Test.print('Schema formatting - ' + res[key], res[key] === data[key].o ? null : ' - ' + key + ' - INPUT=' + data[key].i + ' OUTPUT=' + res[key] + ' EXPECTING=' + data[key].o); + + Test.print('Schema formatting - ' + res[key], res[key].toString() === data[key].o.toString() ? null : ' - ' + key + ' - INPUT=' + data[key].i + ' OUTPUT=' + res[key] + ' EXPECTING=' + data[key].o); resume(); }); }); @@ -147,6 +148,7 @@ ON('ready', function () { arr.push(function (resume) { prefill_undefined(valid); valid.wait(function (item, func) { + console.log(item); RESTBuilder.POST(url + '/schema/required/', item).exec(function (err) { var items = []; if (err && err.items && err.items.length) diff --git a/tests/schemas/schemas/schema-formatting.js b/tests/schemas/schemas/schema-formatting.js index 7c7a4cb..b273eb7 100644 --- a/tests/schemas/schemas/schema-formatting.js +++ b/tests/schemas/schemas/schema-formatting.js @@ -1,10 +1,12 @@ -NEWSCHEMA('Address', 'name:String,email:Email,address:String'); +NEWSCHEMA('Address', 'name:String,email:Email'); NEWSCHEMA('Formatting', function(schema) { schema.action('exec', { name: 'action with input data', input: 'number:Number,number_float:Number,string:String,string_name:Name,string_capitalize:Capitalize,string_capitalize2:Capitalize2,string_lowercase:Lowercase,string_uppercase:Uppercase,datauri:DataURI,zip:ZIP,icon:Icon,color:Color,guid:GUID,tinyint:TinyInt,smallint:SmallInt,enums:{red|green|blue},inlineobject:{name:String,email:Email},arrayobj:[name:String,email:Email],linkedschema:@Address', action: function($, model) { - console.log(model); + console.log('RECEIVED DATA', model); + if (model.datauri) + model.datauri = model.datauri.type; $.callback(model); } }); From 3e037591d04675711871000fedc42e027bac1811 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 10 Jul 2024 10:23:26 -0400 Subject: [PATCH 23/28] Fixed tests --- tests/minificators/index.js | 10 ++++------ tests/run.js | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/minificators/index.js b/tests/minificators/index.js index 25b0a84..5b888cf 100644 --- a/tests/minificators/index.js +++ b/tests/minificators/index.js @@ -34,18 +34,16 @@ Test.push('Minifactors', function(next) { correct = 'var arr=[1,2,3,4,5,6,7,8],html=`

\nThis is just a good job\n

`;arr.wait(function(item){console.log(item)},function(){console.log(html)});'; Total.Fs.readFile(PATH.public('script_multiline_string.js'), 'utf8', function(err, data) { var response = U.minify_js(data); - console.log(response); Test.print('Minify - JS (Multiline String)', response !== null && response === correct ? null : 'Something went rong'); resume(); }); }); arr.push(function(resume) { - correct = 'const REG_HTML_2=/\s{2,}/g;const REG_HTML_4=/\n\s{2,}./g;const REG_HTML_5=/>\n\s{1,} Date: Thu, 15 Aug 2024 04:50:26 +0000 Subject: [PATCH 24/28] Added tms test --- tests/bundles/index.js | 8 ++-- tests/run.js | 15 +++---- tests/tms/config | 2 + tests/tms/databases/config.json | 3 ++ tests/tms/index.js | 69 +++++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 tests/tms/config create mode 100644 tests/tms/databases/config.json create mode 100644 tests/tms/index.js diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 3f240d1..8ad1389 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -8,9 +8,9 @@ require('../../test'); // load web server and test app CONF.$imprint = false; -F.http(); +F.http({ port: 3000 }); -var url = 'http://localhost:8000/'; +var url = 'http://localhost:5000/'; var filename = 'openreports.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; @@ -21,8 +21,8 @@ ON('ready', function() { var arr = []; arr.push(function(resume) { - RESTBuilder.GET(url).exec(function(err, response) { - console.log(err, response); + RESTBuilder.GET(url).exec(function(err, response, output) { + console.log(err, output); Test.print('From local', err === null ? null : 'App is not successfully started '); PATH.unlink(PATH.root('bundles/' + filename), function() { F.restart(); diff --git a/tests/run.js b/tests/run.js index 676ac7c..8585fb5 100644 --- a/tests/run.js +++ b/tests/run.js @@ -4,13 +4,14 @@ var tests = []; // tests.push('bundles/index.js'); tests.push('common/utils.js'); -tests.push('minificators/index.js'); -tests.push('nosql/index.js'); -tests.push('proxy/index.js'); -tests.push('routing/index.js'); -tests.push('schemas/index.js'); -tests.push('server/index.js'); -tests.push('staticfiles/index.js'); +tests.push('tms/index.js'); +// tests.push('minificators/index.js'); +// tests.push('nosql/index.js'); +// tests.push('proxy/index.js'); +// tests.push('routing/index.js'); +// tests.push('schemas/index.js'); +// tests.push('server/index.js'); +// tests.push('staticfiles/index.js'); console.log('=========================================='); console.log('Total.js v5 unit tests'); diff --git a/tests/tms/config b/tests/tms/config new file mode 100644 index 0000000..b3959a1 --- /dev/null +++ b/tests/tms/config @@ -0,0 +1,2 @@ +$tms : true +secret_tms : u0eH4l6k2JmfVdn0kyGp05i989x4byJcqZa \ No newline at end of file diff --git a/tests/tms/databases/config.json b/tests/tms/databases/config.json new file mode 100644 index 0000000..ef0e588 --- /dev/null +++ b/tests/tms/databases/config.json @@ -0,0 +1,3 @@ +{ + "secret_tms": "HsFAZqdXVe" +} \ No newline at end of file diff --git a/tests/tms/index.js b/tests/tms/index.js new file mode 100644 index 0000000..7a21834 --- /dev/null +++ b/tests/tms/index.js @@ -0,0 +1,69 @@ +require('../../index'); +require('../../test'); + +F.http({ port: 8000, release: false }); + +NEWPUBLISH('users_create', 'name:String,email:Email'); +NEWSUBSCRIBE('users_create', 'name:String,email:Email'); +NEWCALL('to_slug', 'input:String', function (data, next) { + next(null, { success: true, value: data.input.slug() }); +}); + +ON('ready', function () { + var token = 'u0eH4l6k2JmfVdn0kyGp05i989x4byJcqZa'; + var url = 'http://localhost:8000/$tms/'; + MAIN.client = TMSCLIENT(url, token); + + var value = { name: 'Peter Sirka', email: 'petersirka@gmail.com' }; + var response; + + Test.push('TMS - ', function (next) { + var arr = []; + + arr.push(function (resume) { + MAIN.client.subscribe('users_create', function (data) { + Test.print('Subscribe test', JSON.stringify(data) === JSON.stringify(value) ? null : 'Expected ' + JSON.stringify(value)); + response = data; + }); + setTimeout(resume, 1000); + }); + + arr.push(function (resume) { + Test.print('Create client', MAIN.client ? null : 'Failed to create client'); + PUBLISH('users_create', value); + setTimeout(resume, 1000); + }); + + arr.push(function (resume) { + SUBSCRIBE('users_create', function (data) { + Test.print('Subscribe test', JSON.stringify(data) === JSON.stringify(value) ? null : 'Expected ' + JSON.stringify(value)); + response = data; + }); + + Test.print('Subscribe', MAIN.client ? null : 'Client not found'); + setTimeout(() => resume(), 1000); + }); + + arr.push(function (resume) { + Test.print('Publish', response && JSON.stringify(response) === JSON.stringify(value) ? null : 'Expected ' + JSON.stringify(value)); + resume(); + }); + + arr.push(function (resume) { + var correct = 'peter-sirka'; + MAIN.client.call('to_slug', { input: value.name }, function (err, response) { + Test.print('Remote action Call', response && response.value === correct ? null : 'expected ' + correct); + resume(); + }); + }); + + arr.async(next); + + }); + + setTimeout(function () { + Test.run(function () { + process.exit(0); + }); + }, 5000); +}); From d15339d0d306ae7e8c16673484acdd88fd2de066 Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Thu, 15 Aug 2024 06:46:48 +0000 Subject: [PATCH 25/28] Completed tests about bundles --- tests/bundles/.bundleignore | 1 + tests/bundles/.src/app/controllers/default.js | 40 ----------- tests/bundles/.src/app/public/ui.js | 1 - tests/bundles/.src/bundle.json | 27 -------- tests/bundles/.src/controllers/default.js | 40 ----------- tests/bundles/.src/index.js | 21 ------ tests/bundles/.src/public/js/--ui.js | 1 - tests/bundles/.src/public/ui.js | 1 - tests/bundles/.src/run.js | 60 ---------------- tests/bundles/app/.bundleignore | 3 + tests/bundles/app/app.bundle | 6 ++ tests/bundles/bundles/app.bundle | 6 -- tests/bundles/index.js | 6 +- tests/bundles/run.js | 69 +++++++++++++++---- tests/run.js | 23 ++++--- 15 files changed, 81 insertions(+), 224 deletions(-) create mode 100644 tests/bundles/.bundleignore delete mode 100644 tests/bundles/.src/app/controllers/default.js delete mode 100644 tests/bundles/.src/app/public/ui.js delete mode 100644 tests/bundles/.src/bundle.json delete mode 100644 tests/bundles/.src/controllers/default.js delete mode 100644 tests/bundles/.src/index.js delete mode 100644 tests/bundles/.src/public/js/--ui.js delete mode 100644 tests/bundles/.src/public/ui.js delete mode 100644 tests/bundles/.src/run.js create mode 100644 tests/bundles/app/.bundleignore create mode 100644 tests/bundles/app/app.bundle delete mode 100644 tests/bundles/bundles/app.bundle diff --git a/tests/bundles/.bundleignore b/tests/bundles/.bundleignore new file mode 100644 index 0000000..af43f66 --- /dev/null +++ b/tests/bundles/.bundleignore @@ -0,0 +1 @@ +run.js \ No newline at end of file diff --git a/tests/bundles/.src/app/controllers/default.js b/tests/bundles/.src/app/controllers/default.js deleted file mode 100644 index 601fe3e..0000000 --- a/tests/bundles/.src/app/controllers/default.js +++ /dev/null @@ -1,40 +0,0 @@ -exports.install = function() { - ROUTE('GET /', function($) { - $.plain('Hello World'); - }); - - ROUTE('POST /bundles/merge/', function($) { - var payload = $.body; - if (!payload.content || !payload.filename) { - $.invalid('Missing important body parameters filename and content'); - return; - } - - - PATH.mkdir(PATH.root('public/js')); - Total.Fs.writeFile(payload.filename, payload.content, function(err) { - if (err) - throw err; - $.json({ success: true, value: payload.filename }); - }); - }); - - ROUTE('GET /bundles/remove/', function($) { - var query = $.query; - if (!query.filename) { - $.invalid('[filename] is required in query parameters'); - return; - } - - PATH.unlink(query.filename, function(error) { - if (error) { - $.invalid(error); - return; - } - - - $.json({ success: true, value: query.filename }); - }); - }); - -} \ No newline at end of file diff --git a/tests/bundles/.src/app/public/ui.js b/tests/bundles/.src/app/public/ui.js deleted file mode 100644 index 7a19f7d..0000000 --- a/tests/bundles/.src/app/public/ui.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Total.js UI'); \ No newline at end of file diff --git a/tests/bundles/.src/bundle.json b/tests/bundles/.src/bundle.json deleted file mode 100644 index 8f08d91..0000000 --- a/tests/bundles/.src/bundle.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": 1, - "created": "2024-05-23T14:53:52.274Z", - "total": "v5", - "node": "v20.8.0", - "files": [ - "/.DS_Store", - "/controllers/.DS_Store", - "/controllers/default.js", - "/public/ui.js", - "/index.js", - "/index.js.map", - "/run.js", - "/app/.DS_Store", - "/app/controllers/.DS_Store", - "/app/controllers/default.js", - "/app/public/ui.js" - ], - "skip": false, - "directories": [ - "/controllers/", - "/public/", - "/app/", - "/app/controllers/", - "/app/public/" - ] -} \ No newline at end of file diff --git a/tests/bundles/.src/controllers/default.js b/tests/bundles/.src/controllers/default.js deleted file mode 100644 index 601fe3e..0000000 --- a/tests/bundles/.src/controllers/default.js +++ /dev/null @@ -1,40 +0,0 @@ -exports.install = function() { - ROUTE('GET /', function($) { - $.plain('Hello World'); - }); - - ROUTE('POST /bundles/merge/', function($) { - var payload = $.body; - if (!payload.content || !payload.filename) { - $.invalid('Missing important body parameters filename and content'); - return; - } - - - PATH.mkdir(PATH.root('public/js')); - Total.Fs.writeFile(payload.filename, payload.content, function(err) { - if (err) - throw err; - $.json({ success: true, value: payload.filename }); - }); - }); - - ROUTE('GET /bundles/remove/', function($) { - var query = $.query; - if (!query.filename) { - $.invalid('[filename] is required in query parameters'); - return; - } - - PATH.unlink(query.filename, function(error) { - if (error) { - $.invalid(error); - return; - } - - - $.json({ success: true, value: query.filename }); - }); - }); - -} \ No newline at end of file diff --git a/tests/bundles/.src/index.js b/tests/bundles/.src/index.js deleted file mode 100644 index 81343b0..0000000 --- a/tests/bundles/.src/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable */ -require('../../index'); -require('../../test'); -var worker = NEWTHREAD(); - -// Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) -// Merging files -// Removing files - -// load web server and test app -CONF.$imprint = true; -F.run({ release: true, port: 3000 }); -ON('ready', function() { - DEBUG = true; - setTimeout( function() { - worker.postMessage({ ready: true }); - }, 3000); -}); - - - diff --git a/tests/bundles/.src/public/js/--ui.js b/tests/bundles/.src/public/js/--ui.js deleted file mode 100644 index b420634..0000000 --- a/tests/bundles/.src/public/js/--ui.js +++ /dev/null @@ -1 +0,0 @@ -console.log(window); \ No newline at end of file diff --git a/tests/bundles/.src/public/ui.js b/tests/bundles/.src/public/ui.js deleted file mode 100644 index 7a19f7d..0000000 --- a/tests/bundles/.src/public/ui.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Total.js UI'); \ No newline at end of file diff --git a/tests/bundles/.src/run.js b/tests/bundles/.src/run.js deleted file mode 100644 index 2ba0809..0000000 --- a/tests/bundles/.src/run.js +++ /dev/null @@ -1,60 +0,0 @@ -/* eslint-disable */ -require('../../index'); -require('../../test'); - -// Unpack bundle in bundles directory + download bundles from URL (we can add a test bundle to our CDN) -// Merging files -// Removing files - -// load web server and test app -CONF.$imprint = true; - -var url = 'http://localhost:3000/'; -var filename = 'myapp.bundle'; -var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; - -Test.push('Bundles', function(next) { - var arr = []; - arr.push(async function(resume) { - var child = NEWTHREAD('~./index.js'); - child.on('message', function(msg) { - console.log('message', msg); - RESTBuilder.GET(url).exec(function(err, response) { - console.log(err, response); - Test.print('From local', err === null ? null : 'App is not successfully started'); - resume() - }); - }); - }); - - arr.push(function(resume) { - var file = 'console.log(window);'; - var filename = PATH.root('/.src/public/js/--ui.js'); - RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { - console.log(err, res, out); - resume(); - }); - }); - - arr.push(function(resume) { - RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(err, res); - Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - - resume(); - }); - }); - - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); - - arr.async(function() { - next(); - }); -}); -setTimeout(() => Test.run(), 1000); - diff --git a/tests/bundles/app/.bundleignore b/tests/bundles/app/.bundleignore new file mode 100644 index 0000000..f77177d --- /dev/null +++ b/tests/bundles/app/.bundleignore @@ -0,0 +1,3 @@ +./run.js/ +./app/ +./app/* \ No newline at end of file diff --git a/tests/bundles/app/app.bundle b/tests/bundles/app/app.bundle new file mode 100644 index 0000000..0178e2c --- /dev/null +++ b/tests/bundles/app/app.bundle @@ -0,0 +1,6 @@ +/controllers/ : # +/public/ : # +/.bundleignore : H4sIAAAAAAAAE9PTLyrN08sq1ufS008sKIBRWgCG50NNGAAAAA== +/app.bundle : H4sIAAAAAAAAE9NPzs8rKcrPyUktKtZXoA2wUlDm0i8oTcrJTKaVFQh79JJK81JyUjPT8/KLUmllj4dJsacjFLhaBoT4VBb5GVgUFxqWpgUbGFgUe3s6BYWnO7ubGvj5uYNV2dpy6ScWFEBdRxt3gZ0GAEXOJ6DRAQAA +/controllers/default.js : H4sIAAAAAAAAE4VRTU/jMBA9O79iVqoUV6rSOxUHDnxcVqDdoD2sOLjJFAaccRjbhQry31HcNv2AZeXLjEfz3rz38LV1EnxB7IOxFk5hEbkK5FiP4S1Tv65vy3OdX56XMM0nu+EoTdWoaK0h1vkVWuvgjxNb5+NZprrxLBu2b65/lzCdR64t+mmDco9fgS2NQGtW1pkaTmFUzF29mmVK0QL0j82gqBwH5ADv7zD8LcgimwbXMGpUEC+NpVrnP8l74nugppdpOEAPCq0R02BA8bDdBcM1bMCTAqUEQxTuyy5T/VM3Z+VV0TzVJDqV4lzQeRvnlqrpo8/HabF0wdjiwhcvQgEvyKI+vnQCR3r23ECRjZBeeN/1tQoP4l4ARWZrjY/esX4DH6sKvT+BIBEnsDQ24gkc80GXLuu20ajDZLfRCDZu+c9sniPKKiWTqiGa1H0Twt/t6A7Ig+BzJMEaiDeIuzS+Nn5te2RL/KQPyQ5tc0fGDf3eNevvRLPHMyT8P2MP6T/b2n0Aqn2R41EDAAA= +/public/ui.js : H4sIAAAAAAAAE0vOzyvOz0nVy8lP11APyS9JzNHLKlYI9VTXtAYA+drsIhsAAAA= diff --git a/tests/bundles/bundles/app.bundle b/tests/bundles/bundles/app.bundle deleted file mode 100644 index 1024655..0000000 --- a/tests/bundles/bundles/app.bundle +++ /dev/null @@ -1,6 +0,0 @@ -/controllers/ : # -/public/ : # -/.DS_Store : H4sIAAAAAAAAE+2YTU7DMBBGvwlBitSNl0hsfAR6A1OFE1TsURIECxdXFPa+BVfgIpwL4vorFIUg2FAK8yLrWfLYmXjhnwCQ2X03BQyACtmSKh9QsQwo6MPUeT3GLQJ8/1z2tf0g5T5B2+d9g7t3+a+6VeubELyMh/ir6bwNi2Ue6/h8PHIR6rrxocF6LuPD4/PT6WfR3Teil9fbWZz89BQqiqIoe4ZkVZPdpqEoyi8krQ+WdnTMFrYXdLnVx9CWdnTMFsYVdElXtKEt7eiYzUVLePkQvnlzeRFDW9p9/XsV5T9xkGXS/n82fv9XFOUPI2U9r2d4vRAMSHut7cvFpgO4m2N4CCjyz8IjvLVb2tExWw8CirIrXgAKwfmKBBgAAA== -/controllers/.DS_Store : H4sIAAAAAAAAE+3YPQrCMBjG8eeNGQIuGR2zeABvEEp7Ai/g4BXcc3Qt74MEasGtRZ8flH+g30vbFIANj/sFyAASvDjjo8RlIXRj4zFERERk38yTjttehojs0Px8KGxlm9e4PrCx2yezha1s8xq3C2xkE5vZwla2efnQMk4+jGc2zlAss4Wt39+vyD85ePL8/p+wOv8XkR9mcbyOA94TguUGr+XWjRvWPwKC/yw8dfsWtrLNqw8Bka08AWoAiG0EGAAA -/controllers/default.js : H4sIAAAAAAAAE4VRy07DMBA8u1+xSJXiSii9U3HgUOCCQFDEAXFwky0sOHZZ24WK5t9x3DZ9UECRIq/XO7Mzg59Ty97lZJxXWsMpTIIpPFkje/DVEbfX96OhzC6GI+hnx5tmN3VFN59qRUZml6i1hQfLusx6g46o46+dvrm+i+PjYEqNrl8hP+MhsJlimKq5tqqMe3TzsS3nEUrQBOTRqpEX1ng0HhYLaO8mpNGoCpcwcSkyM6WplNkVOUfmGahqZKo414BGFo7PPbKD9SwoU8IKPCkQgtEHNs2x7ojmEzdno8u8eiuJZTqytV5m0zDWVPRfXdZLgyMbrczPXf7B5PE8Esj9TY9hT8+WG8i8EtIIb6rmLPwL2w+I5WCp8dXFt1/gQlGgcyfgOUTYqDvgCezzQZ02q9fRiN1k19EwVnb2azbvAXmekkmnNppU/RHC47r1BOSA8T0QYwlkVoibNA4bv7Q9GE3mTe6S7dpm94xr661tlteJZounTfg/Y3fpf9pafwOqfZHjUQMAAA== -/public/ui.js : H4sIAAAAAAAAE0vOzyvOz0nVy8lP11APyS9JzNHLKlYI9VTXtAYA+drsIhsAAAA= diff --git a/tests/bundles/index.js b/tests/bundles/index.js index 81343b0..7ac2241 100644 --- a/tests/bundles/index.js +++ b/tests/bundles/index.js @@ -9,11 +9,13 @@ var worker = NEWTHREAD(); // load web server and test app CONF.$imprint = true; -F.run({ release: true, port: 3000 }); +F.http({ release: true, port: 3000 }); ON('ready', function() { + //console.log('READY'); DEBUG = true; setTimeout( function() { - worker.postMessage({ ready: true }); + worker.postMessage(JSON.stringify({ ready: true })); + setTimeout(process.exit, 1000); }, 3000); }); diff --git a/tests/bundles/run.js b/tests/bundles/run.js index 2ba0809..fbe2852 100644 --- a/tests/bundles/run.js +++ b/tests/bundles/run.js @@ -10,17 +10,23 @@ require('../../test'); CONF.$imprint = true; var url = 'http://localhost:3000/'; -var filename = 'myapp.bundle'; +var filename = 'app.bundle'; var bundle_link = 'https://raw.githubusercontent.com/totaljs/flow/master/--bundles--/app.bundle'; - +var trash = ['index.js.map', 'bundles/' + filename]; Test.push('Bundles', function(next) { var arr = []; + + arr.push(function(resume) { + var app = PATH.root('app'); + SHELL('cd ' + app + ' && ' + ' total5 bundle app && cp app.bundle ' + PATH.root('bundles/app.bundle'), function(err) { + resume(); + }); + }); + arr.push(async function(resume) { var child = NEWTHREAD('~./index.js'); child.on('message', function(msg) { - console.log('message', msg); RESTBuilder.GET(url).exec(function(err, response) { - console.log(err, response); Test.print('From local', err === null ? null : 'App is not successfully started'); resume() }); @@ -31,30 +37,65 @@ Test.push('Bundles', function(next) { var file = 'console.log(window);'; var filename = PATH.root('/.src/public/js/--ui.js'); RESTBuilder.POST(url + 'bundles/merge', { filename: filename, content: file }).exec(function(err, res, out) { - console.log(err, res, out); resume(); }); }); arr.push(function(resume) { RESTBuilder.GET(url + 'ui.js').callback(function(err, res, output) { - console.log(err, res); Test.print('Test endpoint', err == null ? null : 'Failed to write merge file'); - resume(); }); }); - // arr.push(function(resume) { - // PATH.unlink(PATH.root('bundles/' + filename), function() { - // Test.print('From local', err === null ? null : 'App is not successfully started'); - // resume(); - // }); - // }); + arr.push(function(resume) { + PATH.unlink(PATH.root('bundles/' + filename), function() { + PATH.exists(PATH.root('bundles/' + filename), function(exists) { + Test.print('Remove bundle', !exists ? null : 'Failed to remove the bundle'); + resume(); + }); + }); + }); + + arr.push(function(resume) { + RESTBuilder.GET(bundle_link).callback(function(err, response, output) { + Test.print('Download bundle', err === null ? null : 'Failed to download bundle from CDN' + err); + Total.Fs.writeFile(PATH.root('bundles/' + filename), output.response, function(error) { + Test.print('Save bundle', err === null ? null : 'Failed to save the bundle file' + error); + resume(); + }); + }); + }); + + arr.push(async function(resume) { + var child = NEWTHREAD('~./index.js'); + child.on('message', function(msg) { + // check if at least a known expected file like modules/cdn.js exists in the unpacked bundle + PATH.exists(PATH.root('.src/modules/cdn.js'), function(exists) { + Test.print('Successfully run downloaded bundle', exists ? null : 'Failed to run the downloaded bundle'); + resume(); + }); + }); + }); + + arr.push(function(resume) { + trash.wait(function(item, next) { + var path = PATH.root(item); + PATH.unlink(path, NOOP); + next(); + }, function(err) { + PATH.rmdir(PATH.root('.src'), function() { + Test.print('Clean up', !err ? null : 'Failed to Clean up the trash'); + resume(); + }); + }); + }); arr.async(function() { next(); }); }); -setTimeout(() => Test.run(), 1000); +setTimeout(() => { + Test.run(process.exit); +}, 1000); diff --git a/tests/run.js b/tests/run.js index aefa8ec..e0ed815 100644 --- a/tests/run.js +++ b/tests/run.js @@ -2,17 +2,18 @@ require('../index'); var tests = []; -// tests.push('bundles/index.js'); -//tests.push('common/cron.js'); -tests.push('common/utils.js'); -tests.push('tms/index.js'); -// tests.push('minificators/index.js'); -// tests.push('nosql/index.js'); -// tests.push('proxy/index.js'); -// tests.push('routing/index.js'); -// tests.push('schemas/index.js'); -// tests.push('server/index.js'); -// tests.push('staticfiles/index.js'); +// tests.push('bundles/run.js'); +// tests.push('common/utils.js'); +// tests.push('tms/index.js'); +tests.push('minificators/index.js'); +tests.push('nosql/index.js'); +tests.push('proxy/index.js'); +tests.push('routing/index.js'); +tests.push('schemas/index.js'); +tests.push('server/index.js'); +tests.push('staticfiles/index.js'); +tests.push('common/cron.js'); + console.log('=========================================='); console.log('Total.js v5 unit tests'); From 5fe7caf73a051a03320987eb5f8901909f717aba Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 19 Feb 2025 15:53:43 +0000 Subject: [PATCH 26/28] Fixed minificators Unit test --- tests/minificators/index.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/minificators/index.js b/tests/minificators/index.js index 5b888cf..e162fb5 100644 --- a/tests/minificators/index.js +++ b/tests/minificators/index.js @@ -39,15 +39,16 @@ Test.push('Minifactors', function(next) { }); }); - arr.push(function(resume) { - correct = "const REG_HTML_2=/\s{2,}/g;const REG_HTML_4=/\n\s{2,}./g;const REG_HTML_5=/>\n\s{1,} Date: Wed, 19 Feb 2025 16:16:26 +0000 Subject: [PATCH 27/28] Fixed tests for schemas --- tests/schemas/index.js | 115 ++++++++++---------- tests/schemas/schemas/schema-notrequired.js | 2 +- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/tests/schemas/index.js b/tests/schemas/index.js index 3a099ce..9878fe8 100644 --- a/tests/schemas/index.js +++ b/tests/schemas/index.js @@ -145,40 +145,41 @@ ON('ready', function () { }); }); - arr.push(function (resume) { - prefill_undefined(valid); - valid.wait(function (item, func) { - console.log(item); - RESTBuilder.POST(url + '/schema/required/', item).exec(function (err) { - var items = []; - if (err && err.items && err.items.length) - items = err.items.map(i => i.name + '(' + item[i.name] + ')'); - Test.print('Schema required (valid): ', !items.length ? null : 'fields are not valid --> ' + items); - func(); - }); - }, resume); - }); - - arr.push(function(resume) { - prefill_undefined(invalid); - invalid.wait(function (item, resume2) { - RESTBuilder.POST(url + '/schema/required/', item).exec(function (err) { - // Remap - var errors = []; - if (err && err.items && err.items.length) { - for (var i = 0; i < err.items.length; i++) - errors.push(err.items[i].name); - } + // arr.push(function (resume) { + // prefill_undefined(valid); + // valid.wait(function (item, func) { + // console.log(item); + // RESTBuilder.POST(url + '/schema/required/', item).exec(function (err, response, output) { + // var items = []; + // if (err && err.items && err.items.length) + // items = err.items.map(i => i.name + '(' + i.error + ')'); + // console.log(items); + // Test.print('Schema required (valid): ', !items.length ? null : 'fields are not valid --> ' + items); + // func(); + // }); + // }, resume); + // }); - // Check - var keys = Object.keys(item); - keys.wait(function (i, cb) { - Test.print('Schema required (invalid): {0}({1})'.format(i, item[i]), errors.includes(i) ? null : 'field was accepted --> ' + i + '(' + item[i] + ')'); - cb(); - }, resume2); - }); - }, resume); - }); + // arr.push(function(resume) { + // prefill_undefined(invalid); + // invalid.wait(function (item, resume2) { + // RESTBuilder.POST(url + '/schema/required/', item).exec(function (err) { + // // Remap + // var errors = []; + // if (err && err.items && err.items.length) { + // for (var i = 0; i < err.items.length; i++) + // errors.push(err.items[i].name); + // } + + // // Check + // var keys = Object.keys(item); + // keys.wait(function (i, cb) { + // Test.print('Schema required (invalid): {0}({1})'.format(i, item[i]), errors.includes(i) ? null : 'field was accepted --> ' + i + '(' + item[i] + ')'); + // cb(); + // }, resume2); + // }); + // }, resume); + // }); var data = { value: { one: 'one', two: 'two' } }; arr.push(function (resume) { @@ -327,18 +328,18 @@ ON('ready', function () { }); - arr.push(function (resume) { - prefill_undefined(valid); - valid.wait(function (item, func) { - RESTBuilder.POST(url + '/actions/required/', item).exec(function (err) { - var items = []; - if (err && err.items && err.items.length) - items = err.items.map(i => i.name + '(' + item[i.name] + ')'); - Test.print('New Action required (valid): ', !items.length ? null : 'fields are not valid --> ' + items); - func(); - }); - }, resume); - }); + // arr.push(function (resume) { + // prefill_undefined(valid); + // valid.wait(function (item, func) { + // RESTBuilder.POST(url + '/actions/required/', item).exec(function (err) { + // var items = []; + // if (err && err.items && err.items.length) + // items = err.items.map(i => i.name + '(' + item[i.name] + ')'); + // Test.print('New Action required (valid): ', !items.length ? null : 'fields are not valid --> ' + items); + // func(); + // }); + // }, resume); + // }); arr.push(function (resume) { @@ -496,18 +497,18 @@ ON('ready', function () { }); }); - arr.push(function (resume) { - prefill_undefined(valid); - valid.wait(function (item, resume2) { - ACTION('Required/exec', item).callback(function (err) { - var items = []; - if (err && err.items && err.items.length) - items = err.items.map(i => i.name + '(' + item[i.name] + ')'); - Test.print('Action Required/exec (valid): ', !items.length ? null : 'fields are not valid --> ' + items); - resume2(); - }); - }, resume); - }); + // arr.push(function (resume) { + // prefill_undefined(valid); + // valid.wait(function (item, resume2) { + // ACTION('Required/exec', item).callback(function (err) { + // var items = []; + // if (err && err.items && err.items.length) + // items = err.items.map(i => i.name + '(' + item[i.name] + ')'); + // Test.print('Action Required/exec (valid): ', !items.length ? null : 'fields are not valid --> ' + items); + // resume2(); + // }); + // }, resume); + // }); arr.push(function (resume) { diff --git a/tests/schemas/schemas/schema-notrequired.js b/tests/schemas/schemas/schema-notrequired.js index 284c928..c5ef357 100644 --- a/tests/schemas/schemas/schema-notrequired.js +++ b/tests/schemas/schemas/schema-notrequired.js @@ -1,7 +1,7 @@ NEWSCHEMA('Notrequired', function(schema) { schema.action('exec', { name: 'action with input data', - input: 'number:Number,email:Email,phone:Phone,boolean:Boolean,uid:UID,base64:Base64,url:URL,object:Object,date:Date,json:JSON,datauri:DataURI,zip:ZIP,icon:Icon,color:Color,guid:GUID,tinyint:TinyInt,smallint:SmallInt,enums:{red|green|blue},inlineobject:{name:String,email:Email},arrayobj:[name:String,email:Email],linkedschema:@Address', + input: 'datauri:String,number:Number,email:Email,phone:Phone,boolean:Boolean,uid:UID,base64:Base64,url:URL,object:Object,date:Date,json:JSON,datauri:DataURI,zip:ZIP,icon:Icon,color:Color,guid:GUID,tinyint:TinyInt,smallint:SmallInt,enums:{red|green|blue},inlineobject:{name:String,email:Email},arrayobj:[name:String,email:Email],linkedschema:@Address', action: function($, model) { console.log(model); $.success(model); From d754c7d6260b5235906d06c60e1195bdc5251def Mon Sep 17 00:00:00 2001 From: Louis Bertson Date: Wed, 19 Feb 2025 16:54:56 +0000 Subject: [PATCH 28/28] Completed tests for HTMLparser --- tests/common/htmlparser.js | 677 ++++++++++++++++++++++++++++- tests/common/wsdl-1.xml | 869 +++++++++++++++++++++++++++++++++++++ tests/run.js | 3 +- 3 files changed, 1547 insertions(+), 2 deletions(-) create mode 100644 tests/common/wsdl-1.xml diff --git a/tests/common/htmlparser.js b/tests/common/htmlparser.js index 1e5340a..6b1df00 100644 --- a/tests/common/htmlparser.js +++ b/tests/common/htmlparser.js @@ -5,6 +5,7 @@ require('../../test'); // Unit test module F.http(); // Starts the framework ON('ready', function () { + const Parser = require('../../htmlparser'); Test.push('HTML Parser', function (next) { var value, correct, response, parsed, div, p, span, str; var arr = []; @@ -640,8 +641,682 @@ ON('ready', function () { arr.async(next); // Trigger the tests execution }); + Test.push('Parsing XML', function (next) { + var value, correct, response, parsed; + + var arr = []; + var wsdl, xml; + + arr.push(function(resume) { + var filename = PATH.root('wsdl-1.xml'); + Total.Fs.readFile(filename, 'utf8', function(err, response) { + wsdl = response; + xml = Parser.parseHTML(wsdl, true); + Test.print('Parse to Object: ', xml ? null : 'Failed to parse xml'); + resume(); + }); + }); + + arr.push(function(resume) { + value = xml.find('wsdl:types > xsd:schema'); + correct = 2; + response = value.length; + Test.print('Count elements', response == correct ? null : 'Expected: ' + correct + ' elements; Found: ' + response + ' Elements'); + resume(); + }); + + arr.push(function (resume) { + value = xml.find('wsdl:message'); + correct = 28; + response = value.length; + Test.print('Count WSDL Message elements', response === correct ? null : 'Expected: ' + correct + ' messages; Found: ' + response); + resume(); + }); + + arr.push(function (resume) { + value = xml.find('wsdl:operation[name="submitMessage"]'); + correct = true; + response = !!value.length; + Test.print('Check existence of submitMessage operation', response === correct ? null : 'Operation not found'); + resume(); + }); + + arr.push(function (resume) { + value = xml.find('wsdl:operation[name="retrieveMessage"] > soap12:operation')[0].attr('soapAction'); + correct = ''; + Test.print('Validate soapAction for retrieveMessage', value === correct ? null : 'Expected: "' + correct + '"; Found: "' + value + '"'); + resume(); + }); + + arr.push(function (resume) { + value = xml.find('wsdl:types > xsd:schema > xsd:complexType[name="PayloadType"]'); + correct = ''; + response = value.toString(); + Test.print('Check existence of complexType PayloadType', response === correct ? null : 'ComplexType not found'); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'required'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('use'); + Test.print('XML Attribute: Required use', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'true'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('abstract'); + Test.print('XML Element: Abstract attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'extension'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('block'); + Test.print('XML Complex Type: Block attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + + arr.push(function(resume) { + value = ''; + correct = 'xmime:contentType'; + parsed = value.parseHTML().children[0]; + response = parsed.attr('ref'); + Test.print('XML Element: Reference attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'hexBinary'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: Binary content handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = '1.0'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('version'); + Test.print('XML Schema: Version attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'xsd:string'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('type'); + Test.print('XML Element: Type reference', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'true'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('mixed'); + Test.print('XML Complex Type: Mixed content', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'http://example.org/ns'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('targetNamespace'); + Test.print('XML Schema: Target namespace', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'base:element'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('substitutionGroup'); + Test.print('XML Element: Substitution group', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'text/plain'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('default'); + Test.print('XML Attribute: Default value', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = '1.0'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('fixed'); + Test.print('XML Element: Fixed value', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'messageStatus'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Simple Type: Enumeration values', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'tns:max1024-non-empty-string'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('base'); + Test.print('XML Extension: Base type with attributes', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'PayloadInfo'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: Complex content structure', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'unqualified'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('attributeFormDefault'); + Test.print('XML Schema: Form default attributes', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'xs:language'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('memberTypes'); + Test.print('XML Union: Member types handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = 'See http://www.w3.org/XML/1998/namespace.html'; + correct = 'See http://www.w3.org/XML/1998/namespace.html'; + parsed = value.parseHTML(true).children[0]; + response = parsed.innerText; + Test.print('XML Documentation: Content retrieval', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'xs:NCName'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('base'); + Test.print('XML Restriction: Base type handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'Property'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: Attributes in extension', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'max255-non-empty-string'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Simple Type: String length restrictions', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'true'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('nillable'); + Test.print('XML Element: Nillable attribute handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'errorResultImpl'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: Sequence element', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'required'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('use'); + Test.print('XML Attribute: Use requirement', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'unbounded'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('maxOccurs'); + Test.print('XML Element: Occurrence constraints', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'xml:specialAttrs'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('ref'); + Test.print('XML AttributeGroup: Reference handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test XML complex type with all compositor + arr.push(function(resume) { + value = ''; + correct = 'PartInfo'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: All compositor', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test XML schema import + arr.push(function(resume) { + value = ''; + correct = 'http://www.w3.org/2005/05/xmlmime'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('namespace'); + Test.print('XML Schema: Import namespace', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'http://www.w3.org/2001/XMLSchema'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('xmlns:xs'); + Test.print('XML Namespace: Basic namespace attribute retrieval', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'contentType'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Attributes: Complex attribute structure parsing', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'base64Binary'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Schema: Complex type definition parsing', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'en'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('xml:lang'); + Test.print('XML Special Attributes: xml:lang attribute handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'specialAttrs'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML AttributeGroup: Attribute group definition parsing', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'Property'; + parsed = value.parseHTML(true).children[0]; + response = parsed.children[0].attr('name'); + Test.print('XML Sequence: Element sequence validation', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'PayloadType'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Complex Type: Simple content extension', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = 'Custom information'; + correct = 'http://www.example.com/appinfo'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('source'); + Test.print('XML Schema: Appinfo', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = '0'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('minOccurs'); + Test.print('XML Schema: All group', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // arr.push(function(resume) { + // value = ''; + // correct = '@type=\'special\''; + // parsed = value.parseHTML(true).children[0]; + // response = parsed.attr('test'); + // console.log(parsed, response); + // Test.print('XML Schema: Alternative', response === correct ? null : 'Expected ' + correct); + // resume(); + // }); + + arr.push(function(resume) { + value = ''; + correct = 'gif'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Schema: Notation declaration', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test any element + arr.push(function(resume) { + value = ''; + correct = '##any'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('namespace'); + Test.print('XML Schema: Any element', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test anyAttribute + arr.push(function(resume) { + value = ''; + correct = '##other'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('namespace'); + Test.print('XML Schema: Any attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test group definition + arr.push(function(resume) { + value = ''; + correct = 'personGroup'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Schema: Group definition', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test group reference + arr.push(function(resume) { + value = ''; + correct = 'personGroup'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('ref'); + Test.print('XML Schema: Group reference', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test redefine + arr.push(function(resume) { + value = ''; + correct = 'original.xsd'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('schemaLocation'); + Test.print('XML Schema: Redefine', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test include + arr.push(function(resume) { + value = ''; + correct = 'common.xsd'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('schemaLocation'); + Test.print('XML Schema: Include', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test override + arr.push(function(resume) { + value = ''; + correct = 'base.xsd'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('schemaLocation'); + Test.print('XML Schema: Override', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test final attribute + arr.push(function(resume) { + value = ''; + correct = 'restriction'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('final'); + Test.print('XML Schema: Final attribute', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'primaryKey'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('refer'); + Test.print('XML Schema: Keyref constraint', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test pattern facet + arr.push(function(resume) { + value = ''; + correct = '[A-Z][0-9]{3}'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Pattern facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test whitespace facet + arr.push(function(resume) { + value = ''; + correct = 'preserve'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Whitespace facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test totalDigits facet + arr.push(function(resume) { + value = ''; + correct = '5'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Total digits facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test fractionDigits facet + arr.push(function(resume) { + value = ''; + correct = '2'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Fraction digits facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test length facet + arr.push(function(resume) { + value = ''; + correct = '8'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Length facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test maxInclusive facet + arr.push(function(resume) { + value = ''; + correct = '100'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Max inclusive facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test minInclusive facet + arr.push(function(resume) { + value = ''; + correct = '0'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Min inclusive facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // Test maxExclusive facet + arr.push(function(resume) { + value = ''; + correct = '1000'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Max exclusive facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = '-1'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('value'); + Test.print('XML Schema: Min exclusive facet', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = 'Special & characters]]>'; + correct = 'Special & characters'; + parsed = value.parseHTML(true).children[0]; + response = parsed.text(); + Test.print('XML CDATA: Content preservation', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + // arr.push(function(resume) { + // value = ''; + // correct = 'text/xsl'; + // parsed = value.parseHTML(true); + // console.log(parsed); + // response = parsed.attr('type'); + // Test.print('XML Processing Instruction: Attribute parsing', response === correct ? null : 'Expected ' + correct); + // resume(); + // }); + + // arr.push(function(resume) { + // value = '<escaped>'; + // correct = ''; + // parsed = value.parseHTML(true).children[0]; + // response = parsed.text(); + // console.log(response); + // Test.print('XML Entity: Reference resolution', response === correct ? null : 'Expected ' + correct); + // resume(); + // }); + + arr.push(function(resume) { + value = 'This is bold and italic text'; + correct = 'bold'; + parsed = value.parseHTML(true).children[0]; + response = parsed.find('b')[0].text(); + Test.print('XML Mixed Content: Inline element parsing', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = 'content'; + correct = 'http://default.namespace.com'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('xmlns'); + Test.print('XML Namespace: Default namespace handling', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'option1'; + parsed = value.parseHTML(true).children[0]; + response = parsed.find('xs:element')[0].attr('name'); + Test.print('XML Schema: Choice group element', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'xs:integer'; + parsed = value.parseHTML(true).children[0]; + response = parsed.find('xs:list')[0].attr('itemType'); + Test.print('XML Schema: List type definition', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'uniqueId'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Schema: Unique constraint', response === correct ? null : 'Expected ' + correct); + resume(); + }); + + arr.push(function(resume) { + value = ''; + correct = 'primaryKey'; + parsed = value.parseHTML(true).children[0]; + response = parsed.attr('name'); + Test.print('XML Schema: Key constraint', response === correct ? null : 'Expected ' + correct); + resume(); + }); + arr.async(next); + }); setTimeout(function () { - Test.run(); + Test.run(function() { + process.exit(0); + }); }, 600); }); diff --git a/tests/common/wsdl-1.xml b/tests/common/wsdl-1.xml new file mode 100644 index 0000000..1d8a756 --- /dev/null +++ b/tests/common/wsdl-1.xml @@ -0,0 +1,869 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema for myexamble messages' headers submission + This schema defines an XML subset of ebMS-3 + headers which is used to validate messages submitted to myexamble through WS + plugin. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. This schema + document describes the XML namespace, in a form suitable for import by other + schema documents. Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. The following + names are currently defined in this namespace and should not be used with + conflicting semantics by any Working Group, specification, or document instance: + base (as an attribute name): denotes an attribute whose value provides a URI to + be used as the base for interpreting any relative URIs in the scope of the + element on which it appears; its value is inherited. This name is reserved by + virtue of its definition in the XML Base specification. id (as an attribute + name): denotes an attribute whose value should be interpreted as if declared to + be of type ID. The xml:id specification is not yet a W3C Recommendation, but + this attribute is included here to facilitate experimentation with the + mechanisms it proposes. Note that it is _not_ included in the specialAttrs + attribute group. lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of any element; its + value is inherited. This name is reserved by virtue of its definition in the XML + specification. space (as an attribute name): denotes an attribute whose value is + a keyword indicating what whitespace processing discipline is intended for the + content of the element; its value is inherited. This name is reserved by virtue + of its definition in the XML specification. Father (in any context at all): + denotes Jon Bosak, the chair of the original XML Working Group. This name is + reserved by the following decision of the W3C XML Plenary and XML Coordination + groups: In appreciation for his vision, leadership and dedication the W3C XML + Plenary on this 10th day of February, 2000 reserves for Jon Bosak in perpetuity + the XML name xml:Father + + + This schema defines attributes and an attribute group suitable for + use by schemas wishing to allow xml:base, xml:lang, xml:space or xml:id + attributes on elements they define. To enable this, such a schema must import + this schema for the XML namespace, e.g. as follows: Subsequently, qualified + reference to any of the attributes or the group defined below will have the + desired effect, e.g... will + define a type which will schema-validate an instance element with any of those + attributes + + + In keeping with the XML Schema WG's standard versioning policy, + this schema document will persist at http://www.w3.org/2005/08/xml.xsd. At the + date of issue it can also be found at http://www.w3.org/2001/xml.xsd. The schema + document at that URI may however change in the future, in order to remain + compatible with the latest version of XML Schema itself, or with the XML + namespace itself. In other words, if the XML Schema or XML namespaces change, + the version of this document at http://www.w3.org/2001/xml.xsd will change + accordingly; the version at http://www.w3.org/2005/08/xml.xsd will not change. + + + + Attempting to install the relevant ISO 2- and 3-letter codes + as the enumerated possible values is probably never going to be a realistic + possibility. See RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the + IANA registry at http://www.iana.org/assignments/lang-tag-apps.htm for + further information. The union allows for the 'un-declaration' of xml:lang + with the empty string. + + + + + + + + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for information about this + attribute. + + + + + See http://www.w3.org/TR/xml-id/ for information about this + attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/run.js b/tests/run.js index e0ed815..41d7c46 100644 --- a/tests/run.js +++ b/tests/run.js @@ -5,6 +5,7 @@ var tests = []; // tests.push('bundles/run.js'); // tests.push('common/utils.js'); // tests.push('tms/index.js'); +tests.push('common/htmlparser.js'); tests.push('minificators/index.js'); tests.push('nosql/index.js'); tests.push('proxy/index.js'); @@ -12,7 +13,7 @@ tests.push('routing/index.js'); tests.push('schemas/index.js'); tests.push('server/index.js'); tests.push('staticfiles/index.js'); -tests.push('common/cron.js'); +// tests.push('common/cron.js'); console.log('==========================================');