Repository navigation
Create functional tests - #1217
Merged
Merged
Conversation
Sébastien Ros (sebastienros)
requested a review
from David Fowler (davidfowl)
December 6, 2023 01:56
Sébastien Ros (sebastienros)
requested a review
from Mitch Denny (mitchdenny)
December 6, 2023 01:56
Contributor
Author
|
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. |
Sébastien Ros (sebastienros)
requested review from
Brennan (BrennanConroy) and
Eric Erhardt (eerhardt)
December 7, 2023 00:16
[ci-skip] Co-authored-by: Eric Erhardt <[email protected]>
[ci-skip] Co-authored-by: Eric Erhardt <[email protected]>
# 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.
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") | ||
| .AddDatabase(mongoDbName); | ||
|
|
||
| var sqlserverAbstract = AppBuilder.AddSqlServerContainer("sqlserverabstract"); |
There was a problem hiding this comment.
Mitch Denny (@mitchdenny) - what are these "Abstract" containers? It looks to be doing the same thing as above - AppBuilder.AddSqlServerContainer, just with a different name.
Eric Erhardt (eerhardt)
approved these changes
Dec 13, 2023
Eric Erhardt (eerhardt)
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks for this great work.
It might be good to get Mitch Denny (@mitchdenny) to sign off on the changes as well.
This was referenced Dec 13, 2023
Merged
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added functional tests for