mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 05:58:45 +00:00
fix(event handling): use internal pubsub for view update (#1118)
* start sub * start implement subsciptions * start subscription * implementation for member done * admin done * fix: tests * extend handlers * prepary notification * no errors in adminapi * changed current sequence in all packages * ignore mocks * works * subscriptions as singleton * tests * refactor: rename function scope var
This commit is contained in:
@@ -24,6 +24,18 @@ type testHandler struct {
|
||||
bulkLimit uint64
|
||||
}
|
||||
|
||||
func (h *testHandler) AggregateTypes() []models.AggregateType {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *testHandler) CurrentSequence(event *models.Event) (uint64, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func (h *testHandler) Eventstore() eventstore.Eventstore {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *testHandler) ViewModel() string {
|
||||
return h.viewModel
|
||||
}
|
||||
@@ -55,6 +67,8 @@ type eventstoreStub struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (es *eventstoreStub) Subscribe(...models.AggregateType) *eventstore.Subscription { return nil }
|
||||
|
||||
func (es *eventstoreStub) Health(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
@@ -432,7 +446,7 @@ func TestHandleError(t *testing.T) {
|
||||
func(*repository.FailedEvent) error {
|
||||
return nil
|
||||
},
|
||||
func(uint64, time.Time) error {
|
||||
func(*models.Event) error {
|
||||
processedSequence = true
|
||||
return nil
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user