Skip to content

Commit

Permalink
Fix lint and existing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlisa committed Mar 6, 2024
1 parent feb4d7f commit b3d57f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/types/access_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import (
"testing"
"time"

"github.com/gravitational/teleport/api/constants"
"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
"github.com/stretchr/testify/require"

"github.com/gravitational/teleport/api/constants"
)

func TestAssertAccessRequestImplementsResourceWithLabels(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions lib/services/access_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ func TestReviewThresholds(t *testing.T) {
propose: approve,
assumeStartTime: clock.Now().UTC().Add(10000 * time.Hour),
errCheck: func(tt require.TestingT, err error, i ...interface{}) {
require.ErrorIs(tt, err, trace.BadParameter("request start time is after expiry"), i...)
require.Contains(tt, err.Error(), "assume start time cannot equal or exceed access expiry time", i...)
},
},
},
Expand Down Expand Up @@ -703,7 +703,7 @@ func TestReviewThresholds(t *testing.T) {
author, ok := userStates[rt.author]
require.True(t, ok, "scenario=%q, rev=%d", tt.desc, ri)

err = ApplyAccessReview(req, rev, author)
err = ApplyAccessReview(req, rev, author, clock)
if rt.errCheck != nil {
rt.errCheck(t, err)
continue
Expand Down

0 comments on commit b3d57f8

Please sign in to comment.