diff --git a/features/fixtures/docker-compose.yml b/features/fixtures/docker-compose.yml index c2232de..6bc2f8d 100644 --- a/features/fixtures/docker-compose.yml +++ b/features/fixtures/docker-compose.yml @@ -19,6 +19,8 @@ services: - PARAMS_FILTERS - SYNCHRONOUS - SERVER_PORT + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" autoconfigure: @@ -72,6 +74,8 @@ services: - AUTO_CAPTURE_SESSIONS - SYNCHRONOUS - SERVER_PORT + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" command: go run main.go @@ -97,6 +101,8 @@ services: - AUTO_CAPTURE_SESSIONS - SYNCHRONOUS - SERVER_PORT + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" command: go run main.go @@ -121,6 +127,8 @@ services: - AUTO_CAPTURE_SESSIONS - SYNCHRONOUS - SERVER_PORT + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" command: go run main.go @@ -146,6 +154,8 @@ services: - AUTO_CAPTURE_SESSIONS - SYNCHRONOUS - SERVER_PORT + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" command: go run main.go @@ -173,5 +183,7 @@ services: - SYNCHRONOUS - SERVER_PORT - USE_PROPERTIES_FILE_CONFIG + - BUGSNAG_SOURCE_ROOT + - BUGSNAG_PROJECT_PACKAGES restart: "no" command: ./test/run.sh diff --git a/features/handled.feature b/features/handled.feature index 0cb7bf7..2555e34 100644 --- a/features/handled.feature +++ b/features/handled.feature @@ -2,6 +2,7 @@ Feature: Plain handled errors Background: Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_SOURCE_ROOT" to the app directory And I configure the bugsnag endpoint And I have built the service "app" And I set environment variable "AUTO_CAPTURE_SESSIONS" to "false" @@ -14,7 +15,7 @@ Scenario: A handled error sends a report And the event "severity" equals "warning" And the event "severityReason.type" equals "handledError" And the exception is a PathError for request 0 - And the "file" of stack frame 0 ends with "main.go" + And the "file" of stack frame 0 equals "main.go" Scenario: A handled error sends a report with a custom name Given I set environment variable "ERROR_CLASS" to "MyCustomErrorClass" @@ -25,7 +26,7 @@ Scenario: A handled error sends a report with a custom name And the event "severity" equals "warning" And the event "severityReason.type" equals "handledError" And the exception "errorClass" equals "MyCustomErrorClass" - And the "file" of stack frame 0 ends with "main.go" + And the "file" of stack frame 0 equals "main.go" Scenario: Sending an event using a callback to modify report contents When I run the go service "app" with the test case "handled-with-callback" @@ -35,7 +36,7 @@ Scenario: Sending an event using a callback to modify report contents And the event "severity" equals "info" And the event "severityReason.type" equals "userCallbackSetSeverity" And the event "context" equals "nonfatal.go:14" - And the "file" of stack frame 0 ends with "main.go" + And the "file" of stack frame 0 equals "main.go" And stack frame 0 contains a local function spanning 242 to 248 And the "file" of stack frame 1 equals ">insertion<" And the "lineNumber" of stack frame 1 equals 0 @@ -48,7 +49,7 @@ Scenario: Marking an error as unhandled in a callback And the event "severity" equals "error" And the event "severityReason.type" equals "userCallbackSetSeverity" And the event "severityReason.unhandledOverridden" is true - And the "file" of stack frame 0 ends with "main.go" + And the "file" of stack frame 0 equals "main.go" And stack frame 0 contains a local function spanning 254 to 257 Scenario: Unwrapping the causes of a handled error @@ -59,11 +60,11 @@ Scenario: Unwrapping the causes of a handled error And the event "severity" equals "warning" And the event "exceptions.0.message" equals "terminate process" And the "lineNumber" of stack frame 0 equals 292 - And the "file" of stack frame 0 ends with "main.go" + And the "file" of stack frame 0 equals "main.go" And the "method" of stack frame 0 equals "nestedHandledError" And the event "exceptions.1.message" equals "login failed" - And the event "exceptions.1.stacktrace.0.file" ends with "main.go" + And the event "exceptions.1.stacktrace.0.file" equals "main.go" And the event "exceptions.1.stacktrace.0.lineNumber" equals 312 And the event "exceptions.2.message" equals "invalid token" - And the event "exceptions.2.stacktrace.0.file" ends with "main.go" + And the event "exceptions.2.stacktrace.0.file" equals "main.go" And the event "exceptions.2.stacktrace.0.lineNumber" equals 320 diff --git a/features/net-http/handled.feature b/features/net-http/handled.feature index 87dbc37..4c9eb4c 100644 --- a/features/net-http/handled.feature +++ b/features/net-http/handled.feature @@ -2,6 +2,7 @@ Feature: Handled errors Background: Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_SOURCE_ROOT" to the app directory And I configure the bugsnag endpoint And I set environment variable "SERVER_PORT" to "4512" And I set environment variable "AUTO_CAPTURE_SESSIONS" to "false" @@ -17,7 +18,7 @@ Scenario: A handled error sends a report And the event "severity" equals "warning" for request 0 And the event "severityReason.type" equals "handledError" for request 0 And the exception is a PathError for request 0 - And the "file" of stack frame 0 ends with "main.go" for request 0 + And the "file" of stack frame 0 equals "main.go" for request 0 Scenario: A handled error sends a report with a custom name Given I set environment variable "ERROR_CLASS" to "MyCustomErrorClass" @@ -31,4 +32,4 @@ Scenario: A handled error sends a report with a custom name And the event "severity" equals "warning" for request 0 And the event "severityReason.type" equals "handledError" for request 0 And the exception "errorClass" equals "MyCustomErrorClass" for request 0 - And the "file" of stack frame 0 ends with "main.go" for request 0 + And the "file" of stack frame 0 equals "main.go" for request 0 diff --git a/features/plain_features/panics.feature b/features/plain_features/panics.feature index 7debc23..2f239a3 100644 --- a/features/plain_features/panics.feature +++ b/features/plain_features/panics.feature @@ -2,6 +2,7 @@ Feature: Panic handling Background: Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" + Given I set environment variable "BUGSNAG_SOURCE_ROOT" to the app directory And I configure the bugsnag endpoint And I have built the service "app" And I set environment variable "AUTO_CAPTURE_SESSIONS" to "false" @@ -17,7 +18,7 @@ Feature: Panic handling And the exception "message" is one of: | interface conversion: interface is struct {}, not string | | interface conversion: interface {} is struct {}, not string | - And the "method" of stack frame 0 equals "unhandledCrash.func1" - And the "file" of stack frame 0 ends with "main.go" - And the "method" of stack frame 1 equals "unhandledCrash" - And the "file" of stack frame 1 ends with "main.go" + And the in-project frames of the stacktrace are: + | file | method | + | main.go | unhandledCrash.func1 | + | main.go | unhandledCrash |