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 @@ -2,9 +2,11 @@

var server = builder.AddSqlServer("sql");

var database = server.AddDatabase("TargetDatabase");
var database = server.AddDatabase("Database1");

var otherDatabase = server.AddDatabase("OtherTargetDatabase");
var chinookDatabase = server.AddDatabase("Database2");

var otherDatabase = server.AddDatabase("Database3");

var sdkProject = builder.AddSqlProject<Projects.SdkProject>("sdk-project")
.WithReference(database);
Expand All @@ -14,7 +16,7 @@
.WaitForCompletion(sdkProject);

builder.AddSqlPackage<Packages.ErikEJ_Dacpac_Chinook>("chinook")
.WithReference(database);
.WithReference(chinookDatabase);

var connection = builder.AddConnectionString("Aspire");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests;
public class AppHostTests(AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_Hosting_SqlDatabaseProjects_AppHost> fixture) : IClassFixture<AspireIntegrationTestFixture<Projects.CommunityToolkit_Aspire_Hosting_SqlDatabaseProjects_AppHost>>
{
[Theory]
[InlineData("sdk-project", "SdkProject", "TargetDatabase")]
[InlineData("other-sdk-project", "SdkProject", "OtherTargetDatabase")]
[InlineData("chinook", "InvoiceLine", "TargetDatabase")]
[InlineData("sdk-project", "SdkProject", "Database1")]
[InlineData("other-sdk-project", "SdkProject", "Database3")]
[InlineData("chinook", "InvoiceLine", "Database2")]
public async Task ProjectBasedResourceStartsAndRespondsOk(string resourceName, string tableName, string database)
{
await fixture.ResourceNotificationService.WaitForResourceAsync(resourceName, KnownResourceStates.TerminalStates).WaitAsync(TimeSpan.FromMinutes(5));
Expand Down
Loading