From b1980bbad508c1e678817c3c5d05dee6252e2843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A9rault?= Date: Fri, 30 Aug 2024 13:14:45 +0300 Subject: [PATCH] Fix tests --- src/lambda/handler-runner/python-runner/PythonRunner.js | 2 -- tests/runtimes/python/python3/handler.py | 3 --- tests/runtimes/python/python3/python3.test.js | 9 --------- tests/runtimes/python/python3/serverless.yml | 6 ------ 4 files changed, 20 deletions(-) diff --git a/src/lambda/handler-runner/python-runner/PythonRunner.js b/src/lambda/handler-runner/python-runner/PythonRunner.js index ade14d378..0b3f68b07 100644 --- a/src/lambda/handler-runner/python-runner/PythonRunner.js +++ b/src/lambda/handler-runner/python-runner/PythonRunner.js @@ -105,8 +105,6 @@ export default class PythonRunner { const onErr = (data) => { log.notice(data.toString()) - - rej(new Error("Internal Server Error")) } const onLine = (line) => { diff --git a/tests/runtimes/python/python3/handler.py b/tests/runtimes/python/python3/handler.py index ec2425dc5..81e8de244 100644 --- a/tests/runtimes/python/python3/handler.py +++ b/tests/runtimes/python/python3/handler.py @@ -9,6 +9,3 @@ def hello(event, context): "body": json.dumps(body), "statusCode": 200, } - -def error(event, context): - raise Exception("This is an error") diff --git a/tests/runtimes/python/python3/python3.test.js b/tests/runtimes/python/python3/python3.test.js index d5c9bbbc6..d9c55a0f4 100644 --- a/tests/runtimes/python/python3/python3.test.js +++ b/tests/runtimes/python/python3/python3.test.js @@ -37,13 +37,4 @@ describe("Python 3 tests", function desc() { assert.deepEqual(json, expected) }) }) - - it("should return a 500 on error", async () => { - const url = new URL("/dev/error", BASE_URL) - const response = await fetch(url) - const json = await response.json() - - assert.equal(response.status, 500) - assert.equal(json.message, "Internal Server Error") - }) }) diff --git a/tests/runtimes/python/python3/serverless.yml b/tests/runtimes/python/python3/serverless.yml index 54e8c6b7a..b0b11e6a3 100644 --- a/tests/runtimes/python/python3/serverless.yml +++ b/tests/runtimes/python/python3/serverless.yml @@ -23,9 +23,3 @@ functions: method: get path: hello handler: handler.hello - error: - events: - - http: - method: get - path: error - handler: handler.error