Skip to content

Commit

Permalink
e2e: Spew ODataError details before panicing
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Barnes committed Nov 7, 2023
1 parent 83b2a55 commit a2394f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import (
"regexp"
"time"

"github.com/davecgh/go-spew/spew"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

msgraph_errors "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/jongio/azidext/go/azidext"
configclient "github.com/openshift/client-go/config/clientset/versioned"
Expand Down Expand Up @@ -440,6 +442,9 @@ var _ = BeforeSuite(func() {
SetDefaultEventuallyPollingInterval(10 * time.Second)

if err := setup(context.Background()); err != nil {
if oDataError, ok := err.(msgraph_errors.ODataErrorable); ok {
spew.Dump(oDataError.GetErrorEscaped())
}
panic(err)
}
})
Expand All @@ -448,6 +453,9 @@ var _ = AfterSuite(func() {
log.Info("AfterSuite")

if err := done(context.Background()); err != nil {
if oDataError, ok := err.(msgraph_errors.ODataErrorable); ok {
spew.Dump(oDataError.GetErrorEscaped())
}
panic(err)
}
})

0 comments on commit a2394f3

Please sign in to comment.