Skip to content

Commit

Permalink
fix unit test, address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
capnspacehook committed Mar 26, 2024
1 parent 3a4a09f commit dfa690a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/auth/auth_login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ func TestCreateAuthenticateChallenge_mfaVerification(t *testing.T) {
t.Parallel()

resp, err := test.userClient.IsMFARequired(ctx, test.req)
require.NoError(t, err, "CreateAuthenticateChallenge")
require.NoError(t, err, "IsMFARequired")

assert.Equal(t, test.wantMFARequired, resp.Required, "resp.MFARequired mismatch")
assert.Equal(t, test.wantMFARequired, resp.Required, "resp.Required mismatch")
})
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/srv/authhandlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func TestRBACJoinMFA(t *testing.T) {
// create auth handler and dummy node
config := &AuthHandlerConfig{
Server: server,
Emitter: &eventstest.MockRecorderEmitter{},
Emitter: &eventstest.MockEmitter{},
AccessPoint: accessPoint,
}
ah, err := NewAuthHandlers(config)
Expand All @@ -295,7 +295,7 @@ func TestRBACJoinMFA(t *testing.T) {

mfaAuthPref, err := types.NewAuthPreference(types.AuthPreferenceSpecV2{
SecondFactor: constants.SecondFactorOTP,
RequireMFAType: types.RequireMFAType_HARDWARE_KEY_TOUCH,
RequireMFAType: types.RequireMFAType_SESSION,
})
require.NoError(t, err)

Expand All @@ -317,7 +317,7 @@ func TestRBACJoinMFA(t *testing.T) {
},
})
require.NoError(t, err)
_, err = server.auth.CreateRole(ctx, joinMFARole)
err = server.auth.CreateRole(ctx, joinMFARole)
require.NoError(t, err)

joinRole, err := types.NewRole("join", types.RoleSpecV6{
Expand All @@ -328,7 +328,7 @@ func TestRBACJoinMFA(t *testing.T) {
},
})
require.NoError(t, err)
_, err = server.auth.CreateRole(ctx, joinRole)
err = server.auth.CreateRole(ctx, joinRole)
require.NoError(t, err)

tests := []struct {
Expand Down

0 comments on commit dfa690a

Please sign in to comment.