From 9c04512e6940480f0da7a6bd2eba1b1c71fd88f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 30 Jun 2024 11:24:21 +0000 Subject: [PATCH] Remove unneeded test --- tests/ExecutorTest.php | 18 ------------------ .../functions/node-logs-fail/index.js | 16 ---------------- .../functions/node-logs-fail/package.json | 12 ------------ 3 files changed, 46 deletions(-) delete mode 100644 tests/resources/functions/node-logs-fail/index.js delete mode 100644 tests/resources/functions/node-logs-fail/package.json diff --git a/tests/ExecutorTest.php b/tests/ExecutorTest.php index 4bd52cb..988543d 100644 --- a/tests/ExecutorTest.php +++ b/tests/ExecutorTest.php @@ -459,24 +459,6 @@ public function provideScenarios(): array }, 'mimeType' => 'multipart/form-data' ], - [ - 'image' => 'openruntimes/node:v4-21.0', - 'entrypoint' => 'index.js', - 'folder' => 'node-logs-fail', - 'version' => 'v4', - 'startCommand' => 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "pm2 start src/server.js --no-daemon"', - 'buildCommand' => 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "npm i"', - 'assertions' => function ($response) { - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(500, $response['body']['statusCode']); - $this->assertGreaterThan(5 * 1024, strlen($response['body']['logs'])); - $this->assertGreaterThan(0, strlen($response['body']['errors'])); - }, - 'body' => function () { - return 1; - }, - 'mimeType' => 'multipart/form-data' - ], ]; } diff --git a/tests/resources/functions/node-logs-fail/index.js b/tests/resources/functions/node-logs-fail/index.js deleted file mode 100644 index dadf0d8..0000000 --- a/tests/resources/functions/node-logs-fail/index.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = async (context) => { - let log1kb = ''; - - for(let i = 0; i < 1024; i++) { - log1kb += "A"; - } - - //1MB * bodyText log - for(let i = 0; i < 1024 * (+context.req.bodyText); i++) { - context.log(log1kb); - } - - throw new Error('This is an error message'); - - return context.res.send('OK'); -} \ No newline at end of file diff --git a/tests/resources/functions/node-logs-fail/package.json b/tests/resources/functions/node-logs-fail/package.json deleted file mode 100644 index ae2c463..0000000 --- a/tests/resources/functions/node-logs-fail/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "logs", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -}