mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
chore: use pgx v5 (#7577)
* chore: use pgx v5 * chore: update go version * remove direct pq dependency * remove unnecessary type * scan test * map scanner * converter * uint8 number array * duration * most unit tests work * unit tests work * chore: coverage * go 1.21 * linting * int64 gopfertammi * retry go 1.22 * retry go 1.22 * revert to go v1.21.5 * update go toolchain to 1.21.8 * go 1.21.8 * remove test flag * go 1.21.5 * linting * update toolchain * use correct array * use correct array * add byte array * correct value * correct error message * go 1.21 compatible
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
db_mock "github.com/zitadel/zitadel/internal/database/mock"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/eventstore/handler/v2"
|
||||
"github.com/zitadel/zitadel/internal/repository/instance"
|
||||
@@ -384,15 +385,15 @@ func Test_quotaProjection_IncrementUsage(t *testing.T) {
|
||||
name: "",
|
||||
fields: fields{
|
||||
client: func() *database.DB {
|
||||
db, mock, _ := sqlmock.New()
|
||||
db, mock, _ := sqlmock.New(sqlmock.ValueConverterOption(new(db_mock.TypeConverter)))
|
||||
mock.ExpectQuery(regexp.QuoteMeta(incrementQuotaStatement)).
|
||||
WithArgs(
|
||||
"instance_id",
|
||||
1,
|
||||
quota.Unit(1),
|
||||
testNow,
|
||||
2,
|
||||
uint64(2),
|
||||
).
|
||||
WillReturnRows(sqlmock.NewRows([]string{"key"}).
|
||||
WillReturnRows(mock.NewRows([]string{"key"}).
|
||||
AddRow(3))
|
||||
return &database.DB{DB: db}
|
||||
}(),
|
||||
|
Reference in New Issue
Block a user