Skip to content

Commit

Permalink
fix: revert StackTracer test until dependency issues are resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjones committed Sep 25, 2019
1 parent 5f3a9b2 commit 42d99fd
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"reflect"
"testing"
"strings"
rollbarErrors "github.com/rollbar/rollbar-go/errors"
pkgerr "github.com/pkg/errors"
)

type TestTransport struct {
Expand Down Expand Up @@ -464,31 +462,6 @@ func TestTransform(t *testing.T) {
}
}

func TestStackTracer(t *testing.T) {
client := testClient()
client.SetStackTracer(rollbarErrors.StackTracer)

client.ErrorWithLevel(rollbar.ERR, pkgerr.New("Bork"))

if transport, ok := client.Transport.(*TestTransport); ok {
body := transport.Body
if body["data"] == nil {
t.Error("body should have data")
}
data := body["data"].(map[string]interface{})
framesLen := framesLenFromData(data)
if framesLen == 0 {
t.Error("data should have frames set by stackTracer")
}
configuredOptions := configuredOptionsFromData(data)
if !strings.Contains(configuredOptions["stackTracer"].(string), "errors.StackTracer") {
t.Error("data should have stackTracer in diagnostic object")
}
} else {
t.Fail()
}
}

func TestEnabled(t *testing.T) {
client := testClient()
client.SetEnabled(false)
Expand Down

0 comments on commit 42d99fd

Please sign in to comment.