Codebase list golang-github-bugsnag-bugsnag-go / 8d6e27d
bump version Delisa Mason 3 years ago
3 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
00 # Changelog
11
2 ## TBD
2 ## 1.8.0 (2020-12-03)
33
44 ### Enhancements
55
2020 )
2121
2222 // VERSION defines the version of this Bugsnag notifier
23 const VERSION = "1.7.0"
23 const VERSION = "1.8.0"
2424
2525 var panicHandlerOnce sync.Once
2626 var sessionTrackerOnce sync.Once
1010 "github.com/bugsnag/bugsnag-go/sessions"
1111 )
1212
13 const expSmall = `{"apiKey":"","events":[{"app":{"releaseStage":""},"device":{"osName":"%s","runtimeVersions":{"go":"%s"}},"exceptions":[{"errorClass":"","message":"","stacktrace":null}],"metaData":{},"payloadVersion":"4","severity":"","unhandled":false}],"notifier":{"name":"Bugsnag Go","url":"https://github.com/bugsnag/bugsnag-go","version":"1.7.0"}}`
13 const expSmall = `{"apiKey":"","events":[{"app":{"releaseStage":""},"device":{"osName":"%s","runtimeVersions":{"go":"%s"}},"exceptions":[{"errorClass":"","message":"","stacktrace":null}],"metaData":{},"payloadVersion":"4","severity":"","unhandled":false}],"notifier":{"name":"Bugsnag Go","url":"https://github.com/bugsnag/bugsnag-go","version":"1.8.0"}}`
1414
1515 // The large payload has a timestamp in it which makes it awkward to assert against.
1616 // Instead, assert that the timestamp property exist, along with the rest of the expected payload
1717 const expLargePre = `{"apiKey":"166f5ad3590596f9aa8d601ea89af845","events":[{"app":{"releaseStage":"mega-production","type":"gin","version":"1.5.3"},"context":"/api/v2/albums","device":{"hostname":"super.duper.site","osName":"%s","runtimeVersions":{"go":"%s"}},"exceptions":[{"errorClass":"error class","message":"error message goes here","stacktrace":[{"method":"doA","file":"a.go","lineNumber":65},{"method":"fetchB","file":"b.go","lineNumber":99,"inProject":true},{"method":"incrementI","file":"i.go","lineNumber":651}]}],"groupingHash":"custom grouping hash","metaData":{"custom tab":{"my key":"my value"}},"payloadVersion":"4","session":{"startedAt":"`
18 const expLargePost = `,"severity":"info","severityReason":{"type":"unhandledError","attributes":{"framework":"gin"}},"unhandled":true,"user":{"id":"1234baerg134","name":"Kool Kidz on da bus","email":"typo@busgang.com"}}],"notifier":{"name":"Bugsnag Go","url":"https://github.com/bugsnag/bugsnag-go","version":"1.7.0"}}`
18 const expLargePost = `,"severity":"info","severityReason":{"type":"unhandledError","attributes":{"framework":"gin"}},"unhandled":true,"user":{"id":"1234baerg134","name":"Kool Kidz on da bus","email":"typo@busgang.com"}}],"notifier":{"name":"Bugsnag Go","url":"https://github.com/bugsnag/bugsnag-go","version":"1.8.0"}}`
1919
2020 func TestMarshalEmptyPayload(t *testing.T) {
2121 sessionTracker = sessions.NewSessionTracker(&sessionTrackingConfig)