Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karinamzalez committed Jan 30, 2024
1 parent 1825a32 commit bc8cce8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ssas/service/public/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s *PublicMiddlewareTestSuite) TestRequireTokenAuthWithInvalidSignature() {
assert.NotNil(s.T(), err)
})
}
s.server = httptest.NewServer(s.CreateRouter(parseToken, testForToken))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, parseToken, testForToken))
client := s.server.Client()

// Valid token should return a 200 response
Expand Down Expand Up @@ -77,7 +77,7 @@ func (s *PublicMiddlewareTestSuite) TestParseTokenEmptyToken() {
assert.NotNil(s.T(), err)
})
}
s.server = httptest.NewServer(s.CreateRouter(parseToken, testForToken))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, parseToken, testForToken))
client := s.server.Client()

// Valid token should return a 200 response
Expand Down Expand Up @@ -111,7 +111,7 @@ func (s *PublicMiddlewareTestSuite) TestParseTokenValidToken() {
assert.Equal(s.T(), groupIDs, rd.AllowedGroupIDs)
})
}
s.server = httptest.NewServer(s.CreateRouter(parseToken, testForToken))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, parseToken, testForToken))
client := s.server.Client()

_, ts, _ := MintRegistrationToken(oktaID, groupIDs)
Expand All @@ -131,7 +131,7 @@ func (s *PublicMiddlewareTestSuite) TestParseTokenValidToken() {
}

func (s *PublicMiddlewareTestSuite) TestRequireRegTokenAuthValidToken() {
s.server = httptest.NewServer(s.CreateRouter(requireRegTokenAuth))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, requireRegTokenAuth))

// Valid token should return a 200 response
req, err := http.NewRequest("GET", s.server.URL, nil)
Expand Down Expand Up @@ -159,7 +159,7 @@ func (s *PublicMiddlewareTestSuite) TestRequireRegTokenAuthValidToken() {
}

func (s *PublicMiddlewareTestSuite) TestRequireRegTokenAuthRevoked() {
s.server = httptest.NewServer(s.CreateRouter(requireMFATokenAuth))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, requireMFATokenAuth))

// Valid token should return a 200 response
req, err := http.NewRequest("GET", s.server.URL, nil)
Expand Down Expand Up @@ -192,7 +192,7 @@ func (s *PublicMiddlewareTestSuite) TestRequireRegTokenAuthRevoked() {
}

func (s *PublicMiddlewareTestSuite) TestRequireRegTokenAuthEmptyToken() {
s.server = httptest.NewServer(s.CreateRouter(requireRegTokenAuth))
s.server = httptest.NewServer(s.CreateRouter(service.NewCtxLogger, requireRegTokenAuth))
client := s.server.Client()

// Valid token should return a 200 response
Expand Down

0 comments on commit bc8cce8

Please sign in to comment.