Skip to content

Commit

Permalink
fix test logging
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Nov 15, 2023
1 parent 7013eb1 commit dcd9bea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flow/e2e/snowflake/peer_flow_sf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ func (s *PeerFlowE2ETestSuiteSF) setupTemporalLogger() {
s.SetLogger(tlogger)
}

type logWriterType struct{ t *testing.T }

func (l logWriterType) Write(p []byte) (n int, err error) {
l.t.Logf(string(p))
return len(p), nil
}

func (s *PeerFlowE2ETestSuiteSF) SetupSuite() {
err := godotenv.Load()
if err != nil {
Expand All @@ -107,6 +114,7 @@ func (s *PeerFlowE2ETestSuiteSF) SetupSuite() {

log.SetReportCaller(true)
log.SetLevel(log.WarnLevel)
log.SetOutput(logWriterType{t: s.T()})

s.setupTemporalLogger()

Expand Down

0 comments on commit dcd9bea

Please sign in to comment.