mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-04 22:13:36 +00:00
pass linting
This commit is contained in:
@@ -97,6 +97,9 @@ func (q *Queries) SearchMilestones(ctx context.Context, instanceIDs []string, qu
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, errors.ThrowInternal(err, "QUERY-asLsI", "Errors.Internal")
|
||||
}
|
||||
milestones.LatestSequence, err = q.latestSequence(ctx, milestonesTable)
|
||||
return milestones, err
|
||||
|
||||
@@ -140,9 +143,6 @@ func prepareMilestonesQuery(ctx context.Context, db prepareDatabase) (sq.SelectB
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, errors.ThrowInternal(err, "QUERY-CK9mI", "Errors.Query.CloseRows")
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, errors.ThrowInternal(err, "QUERY-asLsI", "Errors.Internal")
|
||||
}
|
||||
return &Milestones{
|
||||
Milestones: milestones,
|
||||
SearchResponse: SearchResponse{
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/repository/instance"
|
||||
)
|
||||
|
||||
@@ -411,10 +411,9 @@ func TestMilestonesProjection_reduces(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
event := baseEvent(t)
|
||||
got, err := tt.reduce(event)
|
||||
if _, ok := err.(errors.InvalidArgument); !ok {
|
||||
if !errors.IsErrorInvalidArgument(err) {
|
||||
t.Errorf("no wrong event mapping: %v, got: %v", err, got)
|
||||
}
|
||||
|
||||
event = tt.args.event(t)
|
||||
got, err = tt.reduce(event)
|
||||
assertReduce(t, got, err, MilestonesProjectionTable, tt.want)
|
||||
|
||||
Reference in New Issue
Block a user