-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create functional tests #1217
Create functional tests #1217
Conversation
tests/testproject/TestProject.IntegrationServiceA/MongoDB/MongoDBExtensions.cs
Outdated
Show resolved
Hide resolved
After some feedback I am going to change the tests to use a Fixture representing this AppHost such that each test can use the same app instance and shut it down when the tests are done. |
tests/testproject/TestProject.IntegrationServiceA/MongoDB/MongoDBExtensions.cs
Outdated
Show resolved
Hide resolved
tests/Aspire.Hosting.Tests/Helpers/AllocatedEndpointAnnotationTestExtensions.cs
Outdated
Show resolved
Hide resolved
tests/testproject/TestProject.IntegrationServiceA/Redis/RedisExtensions.cs
Outdated
Show resolved
Hide resolved
[ci-skip] Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
[ci-skip] Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
# Conflicts: # tests/testproject/TestProject.AppHost/TestProgram.cs # tests/testproject/TestProject.IntegrationServiceA/Program.cs
app.MapGet("/mongodb/movies", GetMoviesAsync); | ||
} | ||
|
||
private static async Task<List<string>> GetDatabaseNamesAsync(IMongoClient client, IMongoDatabase db) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These handlers should probably take the abstract version of the resource as a dependency as a well via keyed DI. That way you can test both flavors.
var mongodbContainer = AppBuilder.AddMongoDBContainer("mongodbcontainer"); | ||
var mongodbContainer = AppBuilder.AddMongoDBContainer("mongodbcontainer") | ||
.AddDatabase(mongoDbName); | ||
|
||
var sqlserverAbstract = AppBuilder.AddSqlServerContainer("sqlserverabstract"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mitchdenny - what are these "Abstract" containers? It looks to be doing the same thing as above - AppBuilder.AddSqlServerContainer
, just with a different name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for this great work.
It might be good to get @mitchdenny to sign off on the changes as well.
Added functional tests for