Skip to content

Commit df03bbc

Browse files
authored
chore(AspireDashboard): Cover connection string provider (#1713)
1 parent 9bbf81b commit df03bbc

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/Testcontainers.AspireDashboard/AspireDashboardConnectionStringProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ internal sealed class AspireDashboardConnectionStringProvider : ContainerConnect
88
/// <inheritdoc />
99
protected override string GetHostConnectionString()
1010
{
11-
return Container.GetConnectionString();
11+
return Container.GetDashboardAddress();
1212
}
1313
}

tests/Testcontainers.AspireDashboard.Tests/AspireDashboardContainerTest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ public async Task GetDashboardReturnsHttpStatusCodeOk()
2929
httpClient.BaseAddress = new Uri(_aspireDashboardContainer.GetDashboardAddress());
3030

3131
// When
32-
using var response = await httpClient.GetAsync("/", TestContext.Current.CancellationToken)
32+
using var httpResponse = await httpClient.GetAsync("/", TestContext.Current.CancellationToken)
3333
.ConfigureAwait(true);
3434

3535
// Then
36-
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
36+
Assert.Equal(HttpStatusCode.OK, httpResponse.StatusCode);
37+
Assert.Equal(_aspireDashboardContainer.GetDashboardAddress(), _aspireDashboardContainer.GetConnectionString());
3738
}
3839

3940
[Fact]

0 commit comments

Comments
 (0)