Skip to content

Commit

Permalink
update logging in main_test
Browse files Browse the repository at this point in the history
  • Loading branch information
karinamzalez committed Jan 25, 2024
1 parent c817439 commit 8370044
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ssas/service/main/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/stretchr/testify/suite"
"gorm.io/gorm"

"github.com/CMSgov/bcda-ssas-app/log"
"github.com/CMSgov/bcda-ssas-app/ssas"
)

Expand Down Expand Up @@ -139,7 +140,7 @@ func (s *MainTestSuite) TestNewAdminSystem() {

func (s *MainTestSuite) TestMainLog() {
var str bytes.Buffer
logger := ssas.GetLogger(ssas.Logger)
logger := ssas.GetLogger(log.Logger)
logger.SetOutput(&str)
main()
output := str.String()
Expand Down Expand Up @@ -205,7 +206,7 @@ func (s *MainTestSuite) TestListIPs() {
err = db.Save(&ip).Error
assert.Nil(s.T(), err)
var str bytes.Buffer
logger := ssas.GetLogger(ssas.Logger)
logger := ssas.GetLogger(log.Logger)
logger.SetOutput(&str)

var flags Flags
Expand Down Expand Up @@ -302,7 +303,7 @@ func captureLog(f func()) string {
origLog io.Writer
)

logger := ssas.GetLogger(ssas.Logger)
logger := ssas.GetLogger(log.Logger)
origLog = logger.Out
logger.SetOutput(&buf)

Expand Down

0 comments on commit 8370044

Please sign in to comment.