mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-03 01:18:51 +00:00
fix(query): realtime data on defined requests (#3726)
* feat: directly specify factors on addCustomLoginPolicy and return on LoginPolicy responses * fix proto * update login policy * feat: directly specify idp on addCustomLoginPolicy and return on LoginPolicy responses * fix: tests * fix(projection): trigger bulk * refactor: clean projection pkg * instance should bulk * fix(query): should trigger bulk on id calls * tests * build prerelease * fix: add shouldTriggerBulk * fix: test Co-authored-by: Livio Amstutz <[email protected]> Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
Max Peintner
parent
5c805c48db
commit
dd2f31683c
@@ -46,7 +46,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
}`),
|
||||
), org.LoginPolicyAddedEventMapper),
|
||||
},
|
||||
reduce: (&LoginPolicyProjection{}).reduceLoginPolicyAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduceLoginPolicyAdded,
|
||||
want: wantReduce{
|
||||
aggregateType: eventstore.AggregateType("org"),
|
||||
sequence: 15,
|
||||
@@ -84,7 +84,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduceLoginPolicyChanged",
|
||||
reduce: (&LoginPolicyProjection{}).reduceLoginPolicyChanged,
|
||||
reduce: (&loginPolicyProjection{}).reduceLoginPolicyChanged,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicyChangedEventType),
|
||||
@@ -140,7 +140,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduceMFAAdded",
|
||||
reduce: (&LoginPolicyProjection{}).reduceMFAAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduceMFAAdded,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicyMultiFactorAddedEventType),
|
||||
@@ -172,7 +172,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduceMFARemoved",
|
||||
reduce: (&LoginPolicyProjection{}).reduceMFARemoved,
|
||||
reduce: (&loginPolicyProjection{}).reduceMFARemoved,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicyMultiFactorRemovedEventType),
|
||||
@@ -204,7 +204,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduceLoginPolicyRemoved",
|
||||
reduce: (&LoginPolicyProjection{}).reduceLoginPolicyRemoved,
|
||||
reduce: (&loginPolicyProjection{}).reduceLoginPolicyRemoved,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicyRemovedEventType),
|
||||
@@ -231,7 +231,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduce2FAAdded",
|
||||
reduce: (&LoginPolicyProjection{}).reduce2FAAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduce2FAAdded,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicySecondFactorAddedEventType),
|
||||
@@ -263,7 +263,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "org.reduce2FARemoved",
|
||||
reduce: (&LoginPolicyProjection{}).reduce2FARemoved,
|
||||
reduce: (&loginPolicyProjection{}).reduce2FARemoved,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(org.LoginPolicySecondFactorRemovedEventType),
|
||||
@@ -295,7 +295,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduceLoginPolicyAdded",
|
||||
reduce: (&LoginPolicyProjection{}).reduceLoginPolicyAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduceLoginPolicyAdded,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicyAddedEventType),
|
||||
@@ -354,7 +354,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduceLoginPolicyChanged",
|
||||
reduce: (&LoginPolicyProjection{}).reduceLoginPolicyChanged,
|
||||
reduce: (&loginPolicyProjection{}).reduceLoginPolicyChanged,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicyChangedEventType),
|
||||
@@ -400,7 +400,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduceMFAAdded",
|
||||
reduce: (&LoginPolicyProjection{}).reduceMFAAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduceMFAAdded,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicyMultiFactorAddedEventType),
|
||||
@@ -432,7 +432,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduceMFARemoved",
|
||||
reduce: (&LoginPolicyProjection{}).reduceMFARemoved,
|
||||
reduce: (&loginPolicyProjection{}).reduceMFARemoved,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicyMultiFactorRemovedEventType),
|
||||
@@ -464,7 +464,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduce2FAAdded",
|
||||
reduce: (&LoginPolicyProjection{}).reduce2FAAdded,
|
||||
reduce: (&loginPolicyProjection{}).reduce2FAAdded,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicySecondFactorAddedEventType),
|
||||
@@ -496,7 +496,7 @@ func TestLoginPolicyProjection_reduces(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "instance.reduce2FARemoved",
|
||||
reduce: (&LoginPolicyProjection{}).reduce2FARemoved,
|
||||
reduce: (&loginPolicyProjection{}).reduce2FARemoved,
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.LoginPolicySecondFactorRemovedEventType),
|
||||
|
||||
Reference in New Issue
Block a user