Skip to content

Commit

Permalink
update container platforms for SAM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Apr 25, 2024
1 parent ad460df commit eca104c
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Resources:
Properties:
CodeUri: app/
Handler: index.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs20.x
Events:
ProxyApiRoot:
Type: Api
Expand Down
56 changes: 28 additions & 28 deletions test/aws-lambda/features/fixtures/simple-app/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,181 +14,181 @@ Globals:
BUGSNAG_AUTO_DETECT_ERRORS: true

Resources:
AsyncUnhandledExceptionFunctionNode14:
AsyncUnhandledExceptionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: unhandled-exception.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
AsyncUnhandledException:
Type: Api
Properties:
Path: /async/unhandled/exception
Method: get

AsyncHandledExceptionFunctionNode14:
AsyncHandledExceptionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: handled-exception.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
AsyncHandledException:
Type: Api
Properties:
Path: /async/handled/exception
Method: get

AsyncPromiseRejectionFunctionNode14:
AsyncPromiseRejectionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: promise-rejection.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
AsyncPromiseRejection:
Type: Api
Properties:
Path: /async/promise/rejection
Method: get

CallbackUnhandledExceptionFunctionNode14:
CallbackUnhandledExceptionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: unhandled-exception.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
CallbackUnhandledException:
Type: Api
Properties:
Path: /callback/unhandled/exception
Method: get

CallbackThrownUnhandledExceptionFunctionNode14:
CallbackThrownUnhandledExceptionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: thrown-unhandled-exception.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
CallbackThrownUnhandledException:
Type: Api
Properties:
Path: /callback/thrown/unhandled/exception
Method: get

CallbackHandledExceptionFunctionNode14:
CallbackHandledExceptionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: handled-exception.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
CallbackHandledException:
Type: Api
Properties:
Path: /callback/handled/exception
Method: get

CallbackPromiseRejectionFunctionNode14:
CallbackPromiseRejectionFunctionNode18:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: promise-rejection.lambdaHandler
Runtime: nodejs14.x
Runtime: nodejs18.x
Events:
CallbackPromiseRejection:
Type: Api
Properties:
Path: /callback/promise/rejection
Method: get

AsyncUnhandledExceptionFunctionNode12:
AsyncUnhandledExceptionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: unhandled-exception.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
AsyncUnhandledException:
Type: Api
Properties:
Path: /async/unhandled/exception
Method: get

AsyncHandledExceptionFunctionNode12:
AsyncHandledExceptionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: handled-exception.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
AsyncHandledException:
Type: Api
Properties:
Path: /async/handled/exception
Method: get

AsyncPromiseRejectionFunctionNode12:
AsyncPromiseRejectionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: async/
Handler: promise-rejection.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
AsyncPromiseRejection:
Type: Api
Properties:
Path: /async/promise/rejection
Method: get

CallbackUnhandledExceptionFunctionNode12:
CallbackUnhandledExceptionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: unhandled-exception.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
CallbackUnhandledException:
Type: Api
Properties:
Path: /callback/unhandled/exception
Method: get

CallbackThrownUnhandledExceptionFunctionNode12:
CallbackThrownUnhandledExceptionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: thrown-unhandled-exception.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
CallbackThrownUnhandledException:
Type: Api
Properties:
Path: /callback/thrown/unhandled/exception
Method: get

CallbackHandledExceptionFunctionNode12:
CallbackHandledExceptionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: handled-exception.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
CallbackHandledException:
Type: Api
Properties:
Path: /callback/handled/exception
Method: get

CallbackPromiseRejectionFunctionNode12:
CallbackPromiseRejectionFunctionNode20:
Type: AWS::Serverless::Function
Properties:
CodeUri: callback/
Handler: promise-rejection.lambdaHandler
Runtime: nodejs12.x
Runtime: nodejs20.x
Events:
CallbackPromiseRejection:
Type: Api
Expand Down
18 changes: 9 additions & 9 deletions test/aws-lambda/features/handled.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Scenario Outline: handled exceptions are reported

Examples:
| lambda | type | node-version |
| AsyncHandledExceptionFunctionNode14 | async | 14 |
| AsyncHandledExceptionFunctionNode12 | async | 12 |
| CallbackHandledExceptionFunctionNode14 | callback | 14 |
| CallbackHandledExceptionFunctionNode12 | callback | 12 |
| AsyncHandledExceptionFunctionNode20 | async | 20 |
| AsyncHandledExceptionFunctionNode18 | async | 18 |
| CallbackHandledExceptionFunctionNode20 | callback | 20 |
| CallbackHandledExceptionFunctionNode18 | callback | 18 |

@simple-app
Scenario Outline: handled exceptions are still reported when autoDetectErrors is false
Expand Down Expand Up @@ -58,10 +58,10 @@ Scenario Outline: handled exceptions are still reported when autoDetectErrors is

Examples:
| lambda | type | node-version |
| AsyncHandledExceptionFunctionNode14 | async | 14 |
| AsyncHandledExceptionFunctionNode12 | async | 12 |
| CallbackHandledExceptionFunctionNode14 | callback | 14 |
| CallbackHandledExceptionFunctionNode12 | callback | 12 |
| AsyncHandledExceptionFunctionNode20 | async | 20 |
| AsyncHandledExceptionFunctionNode18 | async | 18 |
| CallbackHandledExceptionFunctionNode20 | callback | 20 |
| CallbackHandledExceptionFunctionNode18 | callback | 18 |

@serverless-express-app
Scenario: handled exceptions are reported when using serverless-express
Expand All @@ -81,7 +81,7 @@ Scenario: handled exceptions are reported when using serverless-express
And the "file" of stack frame 0 equals "app.js"
And the event "metaData.AWS Lambda context.functionName" equals "ExpressFunction"
And the event "metaData.AWS Lambda context.awsRequestId" is not null
And the event "device.runtimeVersions.node" matches "^14\.\d+\.\d+$"
And the event "device.runtimeVersions.node" matches "^20\.\d+\.\d+$"
When I wait to receive a session
Then the session is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the session "id" is not null
Expand Down
18 changes: 9 additions & 9 deletions test/aws-lambda/features/promise-rejection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Scenario Outline: unhandled promise rejections are reported

Examples:
| lambda | type | node-version |
| AsyncPromiseRejectionFunctionNode14 | async | 14 |
| AsyncPromiseRejectionFunctionNode12 | async | 12 |
| CallbackPromiseRejectionFunctionNode14 | callback | 14 |
| CallbackPromiseRejectionFunctionNode12 | callback | 12 |
| AsyncPromiseRejectionFunctionNode20 | async | 20 |
| AsyncPromiseRejectionFunctionNode18 | async | 18 |
| CallbackPromiseRejectionFunctionNode20 | callback | 20 |
| CallbackPromiseRejectionFunctionNode18 | callback | 18 |

@simple-app
Scenario Outline: unhandled promise rejections are not reported when autoDetectErrors is false
Expand All @@ -51,10 +51,10 @@ Scenario Outline: unhandled promise rejections are not reported when autoDetectE

Examples:
| lambda | type |
| AsyncPromiseRejectionFunctionNode14 | async |
| AsyncPromiseRejectionFunctionNode12 | async |
| CallbackPromiseRejectionFunctionNode14 | callback |
| CallbackPromiseRejectionFunctionNode12 | callback |
| AsyncPromiseRejectionFunctionNode20 | async |
| AsyncPromiseRejectionFunctionNode18 | async |
| CallbackPromiseRejectionFunctionNode20 | callback |
| CallbackPromiseRejectionFunctionNode18 | callback |

@serverless-express-app
Scenario: promise rejections are reported when using serverless-express
Expand All @@ -78,7 +78,7 @@ Scenario: promise rejections are reported when using serverless-express
And the "file" of stack frame 0 equals "app.js"
And the event "metaData.AWS Lambda context.functionName" equals "ExpressFunction"
And the event "metaData.AWS Lambda context.awsRequestId" is not null
And the event "device.runtimeVersions.node" matches "^14\.\d+\.\d+$"
And the event "device.runtimeVersions.node" matches "^20\.\d+\.\d+$"
When I wait to receive a session
Then the session is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the session "id" is not null
Expand Down
36 changes: 18 additions & 18 deletions test/aws-lambda/features/sessions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Scenario Outline: sessions are reported

Examples:
| lambda | handled-count | unhandled-count |
| AsyncUnhandledExceptionFunctionNode14 | 0 | 1 |
| AsyncUnhandledExceptionFunctionNode12 | 0 | 1 |
| CallbackUnhandledExceptionFunctionNode14 | 0 | 1 |
| CallbackUnhandledExceptionFunctionNode12 | 0 | 1 |
| CallbackThrownUnhandledExceptionFunctionNode14 | 0 | 1 |
| CallbackThrownUnhandledExceptionFunctionNode12 | 0 | 1 |
| AsyncHandledExceptionFunctionNode14 | 1 | 0 |
| AsyncHandledExceptionFunctionNode12 | 1 | 0 |
| CallbackHandledExceptionFunctionNode14 | 1 | 0 |
| CallbackHandledExceptionFunctionNode12 | 1 | 0 |
| AsyncUnhandledExceptionFunctionNode20 | 0 | 1 |
| AsyncUnhandledExceptionFunctionNode18 | 0 | 1 |
| CallbackUnhandledExceptionFunctionNode20 | 0 | 1 |
| CallbackUnhandledExceptionFunctionNode18 | 0 | 1 |
| CallbackThrownUnhandledExceptionFunctionNode20 | 0 | 1 |
| CallbackThrownUnhandledExceptionFunctionNode18 | 0 | 1 |
| AsyncHandledExceptionFunctionNode20 | 1 | 0 |
| AsyncHandledExceptionFunctionNode18 | 1 | 0 |
| CallbackHandledExceptionFunctionNode20 | 1 | 0 |
| CallbackHandledExceptionFunctionNode18 | 1 | 0 |

@simple-app
Scenario Outline: no session is sent when autoTrackSessions is false
Expand All @@ -37,11 +37,11 @@ Scenario Outline: no session is sent when autoTrackSessions is false

Examples:
| lambda |
| AsyncUnhandledExceptionFunctionNode14 |
| AsyncUnhandledExceptionFunctionNode12 |
| CallbackUnhandledExceptionFunctionNode14 |
| CallbackUnhandledExceptionFunctionNode12 |
| AsyncHandledExceptionFunctionNode14 |
| AsyncHandledExceptionFunctionNode12 |
| CallbackHandledExceptionFunctionNode14 |
| CallbackHandledExceptionFunctionNode12 |
| AsyncUnhandledExceptionFunctionNode20 |
| AsyncUnhandledExceptionFunctionNode18 |
| CallbackUnhandledExceptionFunctionNode20 |
| CallbackUnhandledExceptionFunctionNode18 |
| AsyncHandledExceptionFunctionNode20 |
| AsyncHandledExceptionFunctionNode18 |
| CallbackHandledExceptionFunctionNode20 |
| CallbackHandledExceptionFunctionNode18 |
28 changes: 14 additions & 14 deletions test/aws-lambda/features/unhandled.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ Scenario Outline: unhandled exceptions are reported

Examples:
| lambda | type | file | node-version | trace-length |
| AsyncUnhandledExceptionFunctionNode14 | async | unhandled-exception.js | 14 | 4 |
| AsyncUnhandledExceptionFunctionNode12 | async | unhandled-exception.js | 12 | 4 |
| CallbackUnhandledExceptionFunctionNode14 | callback | unhandled-exception.js | 14 | 7 |
| CallbackUnhandledExceptionFunctionNode12 | callback | unhandled-exception.js | 12 | 7 |
| CallbackThrownUnhandledExceptionFunctionNode14 | callback | thrown-unhandled-exception.js | 14 | 7 |
| CallbackThrownUnhandledExceptionFunctionNode12 | callback | thrown-unhandled-exception.js | 12 | 7 |
| AsyncUnhandledExceptionFunctionNode20 | async | unhandled-exception.js | 20 | 4 |
| AsyncUnhandledExceptionFunctionNode18 | async | unhandled-exception.js | 18 | 4 |
| CallbackUnhandledExceptionFunctionNode20 | callback | unhandled-exception.js | 20 | 7 |
| CallbackUnhandledExceptionFunctionNode18 | callback | unhandled-exception.js | 18 | 7 |
| CallbackThrownUnhandledExceptionFunctionNode20 | callback | thrown-unhandled-exception.js | 20 | 7 |
| CallbackThrownUnhandledExceptionFunctionNode18 | callback | thrown-unhandled-exception.js | 18 | 7 |

@simple-app
Scenario Outline: no error is reported when autoDetectErrors is false
Expand All @@ -46,12 +46,12 @@ Scenario Outline: no error is reported when autoDetectErrors is false

Examples:
| lambda | type |
| AsyncUnhandledExceptionFunctionNode14 | async |
| AsyncUnhandledExceptionFunctionNode12 | async |
| CallbackUnhandledExceptionFunctionNode14 | callback |
| CallbackUnhandledExceptionFunctionNode12 | callback |
| CallbackThrownUnhandledExceptionFunctionNode14 | callback |
| CallbackThrownUnhandledExceptionFunctionNode12 | callback |
| AsyncUnhandledExceptionFunctionNode20 | async |
| AsyncUnhandledExceptionFunctionNode18 | async |
| CallbackUnhandledExceptionFunctionNode20 | callback |
| CallbackUnhandledExceptionFunctionNode18 | callback |
| CallbackThrownUnhandledExceptionFunctionNode20 | callback |
| CallbackThrownUnhandledExceptionFunctionNode18 | callback |

@serverless-express-app
Scenario Outline: unhandled exceptions are reported when using serverless-express
Expand All @@ -74,7 +74,7 @@ Scenario Outline: unhandled exceptions are reported when using serverless-expres
And the "file" of stack frame 0 equals "app.js"
And the event "metaData.AWS Lambda context.functionName" equals "ExpressFunction"
And the event "metaData.AWS Lambda context.awsRequestId" is not null
And the event "device.runtimeVersions.node" matches "^14\.\d+\.\d+$"
And the event "device.runtimeVersions.node" matches "^20\.\d+\.\d+$"
When I wait to receive a session
Then the session is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the session "id" is not null
Expand Down Expand Up @@ -104,7 +104,7 @@ Scenario: unhandled asynchronous exceptions are reported when using serverless-e
And the "file" of stack frame 0 equals "app.js"
And the event "metaData.AWS Lambda context.functionName" equals "ExpressFunction"
And the event "metaData.AWS Lambda context.awsRequestId" is not null
And the event "device.runtimeVersions.node" matches "^14\.\d+\.\d+$"
And the event "device.runtimeVersions.node" matches "^20\.\d+\.\d+$"
When I wait to receive a session
Then the session is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the session "id" is not null
Expand Down

0 comments on commit eca104c

Please sign in to comment.