Skip to content

Commit

Permalink
#3634 do not validate tenancy mapping of live stream aggregations
Browse files Browse the repository at this point in the history
  • Loading branch information
erdtsieck authored and jeremydmiller committed Jan 24, 2025
1 parent d0b43b7 commit bc4e604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/DaemonTests/event_projection_scenario_tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public async Task happy_path_test_with_live_projection_multi_tenanted()

await theStore.Advanced.EventProjectionScenario(scenario =>
{
scenario.Append(Guid.NewGuid(), new CreateUser { UserId = id, UserName = "Kareem" });
scenario.Append(id, new CreateUser { UserId = id, UserName = "Kareem" });
scenario.DocumentShouldNotExist<User>(id);
});

Expand Down Expand Up @@ -308,12 +308,10 @@ public class LiveUser
public Guid Id { get; set; }
public string UserName { get; set; }

public LiveUser Create(CreateUser create)
{
return new LiveUser
public static LiveUser Create(CreateUser create) =>
new()
{
Id = create.UserId,
UserName = create.UserName
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ internal override IEnumerable<string> ValidateConfiguration(StoreOptions options
if (options.Events.TenancyStyle != mapping.TenancyStyle
&& (options.Events.TenancyStyle == TenancyStyle.Single
|| options.Events is
{ TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false })
{ TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false }
&& Lifecycle != ProjectionLifecycle.Live)
)
{
yield return
Expand Down

0 comments on commit bc4e604

Please sign in to comment.