diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 03f003a..5f141e7 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -13,6 +13,7 @@ on: jobs: tests: runs-on: ubuntu-latest + timeout-minutes: 5 strategy: matrix: diff --git a/python/tests/serverless.yml b/python/tests/serverless.yml index ec512f0..0596e73 100644 --- a/python/tests/serverless.yml +++ b/python/tests/serverless.yml @@ -16,7 +16,7 @@ functions: events: - http: method: get - path: / + path: "" handler: src/handler.handler environment: NEW_RELIC_LAMBDA_HANDLER: src/handler.handler diff --git a/python/tests/src/handler.py b/python/tests/src/handler.py index 17b74a7..18343fb 100644 --- a/python/tests/src/handler.py +++ b/python/tests/src/handler.py @@ -1,2 +1,2 @@ -def handler(): +def handler(event, context): print("Running handler.") diff --git a/python/tests/test_lambda_handler.py b/python/tests/test_lambda_handler.py index 4cdbcf3..33d480c 100644 --- a/python/tests/test_lambda_handler.py +++ b/python/tests/test_lambda_handler.py @@ -2,6 +2,6 @@ def test_lamdba_handler(): - response = requests.get("http://localhost:3000", timeout=10) + response = requests.get("http://localhost:3000/dev", timeout=10) assert response.status_code == 200