Skip to content

Commit

Permalink
is: Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Oct 21, 2024
1 parent 8a781a3 commit 541debc
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/identityserver/store/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type PaginationDefaults struct {
var paginationDefaults = PaginationDefaults{}

// SetPaginationDefaults should only be called at the initialization of the server, never on regitries or
// auxiliary functions
// auxiliary functions.
func SetPaginationDefaults(d PaginationDefaults) { paginationDefaults = d }

type paginationOptionsKeyType struct{}
Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/api_key_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ func (st *StoreTest) TestAPIKeyStorePagination(t *T) {
})
}

// TestAPIKeyStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestAPIKeyStorePaginationDefaults(t *T) {
app1 := st.population.NewApplication(nil)

Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/application_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func (st *StoreTest) TestApplicationStorePagination(t *T) {
})
}

// TestApplicationStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestApplicationStorePaginationDefaults(t *T) {
usr1 := st.population.NewUser()

Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/client_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ func (st *StoreTest) TestClientStorePagination(t *T) {
})
}

// TestClientStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestClientStorePaginationDefaults(t *T) {
usr1 := st.population.NewUser()

Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/invitation_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func (st *StoreTest) TestInvitationStorePagination(t *T) {
})
}

// TestInvitationStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestInvitationStorePaginationDefaults(t *T) {
a, ctx := test.New(t)
start := time.Now().Truncate(time.Second)
Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/membership_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ func (st *StoreTest) TestMembershipStorePagination(t *T) {
})
}

// TestMembershipStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestMembershipStorePaginationDefaults(t *T) {
var apps []*ttnpb.Application
for i := 0; i < 102; i++ {
Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/oauth_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ func (st *StoreTest) TestOAuthStorePagination(t *T) {
})
}

// TestOAuthStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestOAuthStorePaginationDefaults(t *T) {
a, ctx := test.New(t)

Expand Down
4 changes: 2 additions & 2 deletions pkg/identityserver/storetest/organization_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ func (st *StoreTest) TestOrganizationStorePagination(t *T) {
})
}

// TestOrganizationStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestOrganizationStorePaginationDefaults(t *T) {
usr1 := st.population.NewUser()

var all []*ttnpb.Organization
for i := 0; i < 102; i++ {
all = append(all, st.population.NewOrganization(usr1.GetOrganizationOrUserIdentifiers()))
st.population.NewOrganization(usr1.GetOrganizationOrUserIdentifiers())
}

s, ok := st.PrepareDB(t).(interface {
Expand Down
3 changes: 2 additions & 1 deletion pkg/identityserver/storetest/user_session_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func (st *StoreTest) TestUserSessionStorePagination(t *T) {
})
}

// TestUserSessionStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestUserSessionStorePaginationDefaults(t *T) {
a, ctx := test.New(t)

Expand All @@ -254,7 +255,7 @@ func (st *StoreTest) TestUserSessionStorePaginationDefaults(t *T) {
t.FailNow()
}

time.Sleep(test.Delay) // The tests depend on sorting by created_at, so we don't want multiple sessions with the same time.
time.Sleep(test.Delay)
}

t.Run("FindSessions_PageLimit", func(t *T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/identityserver/storetest/user_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ func (st *StoreTest) TestUserStorePagination(t *T) {
})
}

// TestUserStorePaginationDefaults tests the default pagination values.
func (st *StoreTest) TestUserStorePaginationDefaults(t *T) {
for i := 0; i < 102; i++ {
st.population.NewUser()
Expand Down

0 comments on commit 541debc

Please sign in to comment.