Skip to content

Commit

Permalink
tmp userlog
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj committed Aug 18, 2023
1 parent b2b9557 commit 76f80eb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions services/userlog/pkg/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var _ = Describe("UserlogService", func() {

ul, err = service.NewUserlogService(
service.Config(cfg),
service.Consumer(bus),
service.Stream(bus),
service.Store(sto),
service.Logger(log.NewLogger()),
service.Mux(chi.NewMux()),
Expand All @@ -95,9 +95,9 @@ var _ = Describe("UserlogService", func() {

It("it stores, returns and deletes a couple of events", func() {
ids := make(map[string]struct{})
ids[bus.Publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
ids[bus.Publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
ids[bus.Publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
ids[bus.publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
ids[bus.publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
ids[bus.publish(events.SpaceDisabled{Executant: &user.UserId{OpaqueId: "executinguserid"}})] = struct{}{}
// ids[bus.Publish(events.SpaceMembershipExpired{SpaceOwner: &user.UserId{OpaqueId: "userid"}})] = struct{}{}
// ids[bus.Publish(events.ShareCreated{Executant: &user.UserId{OpaqueId: "userid"}})] = struct{}{}

Expand Down Expand Up @@ -155,7 +155,11 @@ func (tb testBus) Consume(_ string, _ ...microevents.ConsumeOption) (<-chan micr
return ch, nil
}

func (tb testBus) Publish(e interface{}) string {
func (tb testBus) Publish(_ string, _ interface{}, _ ...microevents.PublishOption) error {
return nil
}

func (tb testBus) publish(e interface{}) string {
ev := events.Event{
ID: uuid.New().String(),
Type: reflect.TypeOf(e).String(),
Expand Down

0 comments on commit 76f80eb

Please sign in to comment.