diff options
| author | Amir Zarrinkafsh <nightah@me.com> | 2020-12-16 12:47:31 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-16 12:47:31 +1100 |
| commit | b989c1b169d0ccfe105c8c3efa1c2fb63cd18023 (patch) | |
| tree | 24bf1fc89a62d273ee50511fcf780dbdc1bb3e9f /internal/handlers/handler_sign_u2f_step2_test.go | |
| parent | 7c6a86882f93515a148cadcce8eccd77c3f24433 (diff) | |
[MISC] Refactor and address most errcheck linter ignores (#1511)
* [MISC] Refactor and address most errcheck linter ignores
This is mostly a quality of life change.
When we first implemented the errcheck linter we ignored a number of items in our legacy codebase with intent to revisit down the track.
* Handle errors for regulation marks and remove unnecessary logging
Diffstat (limited to 'internal/handlers/handler_sign_u2f_step2_test.go')
| -rw-r--r-- | internal/handlers/handler_sign_u2f_step2_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/handlers/handler_sign_u2f_step2_test.go b/internal/handlers/handler_sign_u2f_step2_test.go index 45a343307..52b7c9073 100644 --- a/internal/handlers/handler_sign_u2f_step2_test.go +++ b/internal/handlers/handler_sign_u2f_step2_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "github.com/tstranex/u2f" @@ -25,7 +26,8 @@ func (s *HandlerSignU2FStep2Suite) SetupTest() { userSession.Username = testUsername userSession.U2FChallenge = &u2f.Challenge{} userSession.U2FRegistration = &session.U2FRegistration{} - s.mock.Ctx.SaveSession(userSession) //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting. + err := s.mock.Ctx.SaveSession(userSession) + require.NoError(s.T(), err) } func (s *HandlerSignU2FStep2Suite) TearDownTest() { |
