Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ public async Task teardown()
(await ConfigureBuilder(false, 30)
.RunJasperFxCommands(["resources", "teardown"])).ShouldBe(0);
}

[Fact]
public async Task db_assert_includes_transport_tables()
{
(await ConfigureBuilder(false, 40)
.RunJasperFxCommands(["db-apply"])).ShouldBe(0);

var result = await ConfigureBuilder(false, 40)
.RunJasperFxCommands(["resources", "check"]);

// resources check should succeed because db-apply have included
// endpoints in the database schema configuration
result.ShouldBe(0);
}
}

public class SRMessage1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Weasel.Core.Migrations;
using Wolverine.Persistence.Durability;
using Wolverine.Runtime;
using Wolverine.Transports;

namespace Wolverine.RDBMS.MultiTenancy;

Expand Down Expand Up @@ -44,9 +45,17 @@ public async ValueTask<DatabaseUsage> DescribeDatabasesAsync(CancellationToken t
return usage;
}

public ValueTask<IReadOnlyList<IDatabase>> BuildDatabases()
public async ValueTask<IReadOnlyList<IDatabase>> BuildDatabases()
{
return _runtime.Stores.FindAllAsync<IDatabase>();
if (!_runtime.Options.ExternalTransportsAreStubbed)
{
foreach (var transport in _runtime.Options.Transports.OfType<ITransportConfiguresRuntime>().ToArray())
{
await transport.ConfigureAsync(_runtime);
}
}

return await _runtime.Stores.FindAllAsync<IDatabase>();
}

public DatabaseCardinality Cardinality => _runtime.Stores.Cardinality();
Expand Down
Loading