Skip to content

Commit

Permalink
Merge pull request #1204 from bugsnag/fix-node-maze-runner-tests
Browse files Browse the repository at this point in the history
Fix Node Maze Runner tests on Maze Runner v3.6.0
  • Loading branch information
imjoehaines committed Dec 16, 2020
2 parents 2632836 + 64e3b1c commit 2f48364
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN npm pack --verbose packages/plugin-koa/
RUN npm pack --verbose packages/plugin-restify/

# The maze-runner node tests
FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:v3.5.1-cli as node-maze-runner
FROM 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v3-cli as node-maze-runner
WORKDIR /app/
COPY packages/node/ .
COPY test/node test/node
Expand Down
8 changes: 5 additions & 3 deletions test/node/features/koa-1x.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ Scenario: throwing non-Error error
And the exception "type" equals "nodejs"

Scenario: A non-5XX error created with ctx.throw()
Then I open the URL "http://koa-1x/ctx-throw-400"
And I wait for 1 second
Then I should receive no requests
When I open the URL "http://koa-1x/ctx-throw-400"
And I wait to receive a request
Then the request is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the payload has a valid sessions array
And the sessionCount "sessionsStarted" equals 1

Scenario: A handled error with ctx.bugsnag.notify()
Then I open the URL "http://koa-1x/handled"
Expand Down
8 changes: 5 additions & 3 deletions test/node/features/koa.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ Scenario: throwing non-Error error
And the exception "type" equals "nodejs"

Scenario: A non-5XX error created with ctx.throw()
Then I open the URL "http://koa/ctx-throw-400"
And I wait for 1 second
Then I should receive no requests
When I open the URL "http://koa/ctx-throw-400"
And I wait to receive a request
Then the request is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the payload has a valid sessions array
And the sessionCount "sessionsStarted" equals 1

Scenario: A handled error with ctx.bugsnag.notify()
Then I open the URL "http://koa/handled"
Expand Down
8 changes: 5 additions & 3 deletions test/node/features/restify.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ Scenario: throwing non-Error error
And the exception "type" equals "nodejs"

Scenario: an explicit 404
Then I open the URL "http://restify/not-found"
And I wait for 1 second
Then I should receive no requests
When I open the URL "http://restify/not-found"
And I wait to receive a request
Then the request is valid for the session reporting API version "1" for the "Bugsnag Node" notifier
And the payload has a valid sessions array
And the sessionCount "sessionsStarted" equals 1

Scenario: an explicit internal server error
Then I open the URL "http://restify/internal"
Expand Down

0 comments on commit 2f48364

Please sign in to comment.