mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-01 00:18:51 +00:00
feat(storage): read only transactions (#6417)
feat(storage): read only transactions for queries (#6415) * fix: tests * bastle wie en grosse * fix(database): scan as callback * fix tests * fix merge failures * remove as of system time * refactor: remove unused test * refacotr: remove unused lines
This commit is contained in:
@@ -98,7 +98,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
name: "prepareLoginPolicyQuery no result",
|
||||
prepare: prepareLoginPolicyQuery,
|
||||
want: want{
|
||||
sqlExpectations: mockQueries(
|
||||
sqlExpectations: mockQueriesScanErr(
|
||||
regexp.QuoteMeta(loginPolicyQuery),
|
||||
nil,
|
||||
nil,
|
||||
@@ -189,13 +189,13 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
return nil, true
|
||||
},
|
||||
},
|
||||
object: nil,
|
||||
object: (*LoginPolicy)(nil),
|
||||
},
|
||||
{
|
||||
name: "prepareLoginPolicy2FAsQuery no result",
|
||||
prepare: prepareLoginPolicy2FAsQuery,
|
||||
want: want{
|
||||
sqlExpectations: mockQuery(
|
||||
sqlExpectations: mockQueryScanErr(
|
||||
regexp.QuoteMeta(prepareLoginPolicy2FAsStmt),
|
||||
prepareLoginPolicy2FAsCols,
|
||||
nil,
|
||||
@@ -257,13 +257,13 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
return nil, true
|
||||
},
|
||||
},
|
||||
object: nil,
|
||||
object: (*SecondFactors)(nil),
|
||||
},
|
||||
{
|
||||
name: "prepareLoginPolicyMFAsQuery no result",
|
||||
prepare: prepareLoginPolicyMFAsQuery,
|
||||
want: want{
|
||||
sqlExpectations: mockQuery(
|
||||
sqlExpectations: mockQueryScanErr(
|
||||
regexp.QuoteMeta(prepareLoginPolicyMFAsStmt),
|
||||
prepareLoginPolicyMFAsCols,
|
||||
nil,
|
||||
@@ -325,7 +325,7 @@ func Test_LoginPolicyPrepares(t *testing.T) {
|
||||
return nil, true
|
||||
},
|
||||
},
|
||||
object: nil,
|
||||
object: (*MultiFactors)(nil),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user