Skip to content

Commit

Permalink
[tests] Add tests for more Playground apps (#5294)
Browse files Browse the repository at this point in the history
- Add `milvus` playground app to the tests.
- Skip the redis commander in `TestShop` for tests, as it requires connecting to other containers which is not supported on our CI yet. And we don't really connect, and check the web app.
- Reduce log level to `debug` from `trace`.
  • Loading branch information
radical authored Aug 15, 2024
1 parent 1fa8e5f commit 6173930
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions playground/TestShop/TestShop.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
.AddDatabase("catalogdb");

var basketCache = builder.AddRedis("basketcache")
.WithDataVolume()
.WithRedisCommander(c =>
{
c.WithHostPort(33801);
});
.WithDataVolume();

#if !SKIP_DASHBOARD_REFERENCE
basketCache.WithRedisCommander(c =>
{
c.WithHostPort(33801);
});
#endif

var catalogService = builder.AddProject<Projects.CatalogService>("catalogservice")
.WithReference(catalogDb)
Expand Down
2 changes: 2 additions & 0 deletions tests/Aspire.Playground.Tests/AppHostTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public static TheoryData<TestEndpoints> TestEndpoints()
{
IList<TestEndpoints> candidates =
[
new TestEndpoints("MilvusPlayground.AppHost",
resourceEndpoints: new() { { "apiservice", ["/alive", "/health", "/create", "/search"] } }),
new TestEndpoints("CosmosEndToEnd.AppHost",
resourceEndpoints: new() { { "api", ["/alive", "/health", "/", "/ef"] } },
waitForTexts: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ProjectReference Include="$(PlaygroundSourceDir)SqlServerEndToEnd/SqlServerEndToEnd.AppHost/SqlServerEndToEnd.AppHost.csproj" />
<ProjectReference Include="$(PlaygroundSourceDir)TestShop/TestShop.AppHost/TestShop.AppHost.csproj" />
<ProjectReference Include="$(PlaygroundSourceDir)keycloak/Keycloak.AppHost/Keycloak.AppHost.csproj" />
<ProjectReference Include="$(PlaygroundSourceDir)milvus/MilvusPlayground.AppHost/MilvusPlayground.AppHost.csproj" />

<!-- Issue: https://github.com/dotnet/aspire/issues/5274 -->
<!--<ProjectReference Include="$(PlaygroundSourceDir)mongo/Mongo.AppHost/Mongo.AppHost.csproj" />-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(stri
{
logging.AddXunit(testOutput);
}
logging.SetMinimumLevel(LogLevel.Trace);
logging.AddFilter("Aspire", LogLevel.Trace);
logging.AddFilter(builder.Environment.ApplicationName, LogLevel.Trace);
logging.SetMinimumLevel(LogLevel.Debug);
logging.AddFilter("Aspire", LogLevel.Debug);
logging.AddFilter(builder.Environment.ApplicationName, LogLevel.Debug);
});

return builder;
Expand Down

0 comments on commit 6173930

Please sign in to comment.