-
Notifications
You must be signed in to change notification settings - Fork 498
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
Ensure CosmosDB Components have enough testing #668
Comments
@eerhardt By the tests that actually connect to a server you mean the stuff in tests/testproject? |
@mitchdenny added a test in #1668 for this. My original intention was to follow the same pattern as we do in the other Azure components - if the test is configured to a service that can be connected to, it runs more tests. For example, for Storage Blobs:
aspire/tests/Aspire.Azure.Storage.Blobs.Tests/ConformanceTests.cs Lines 122 to 132 in e8288d7
|
@eerhardt Ok that seems quite logical, but where should the server run? Why is one of them running locally while the other uses a remote connection? What should be used for the cosmosdb? As there is an emulator (which is used in TestProject) i would guess it should be running locally? |
Getting component tests running against a local container / emulator is something that has been on our list. Weare actively working on figuring out how to do more and better testing here. For this, my hope is that we can spin the local emulator up at the beginning of the tests and then run the suite of tests hitting it. However we don't have the test infrastructure to do this easily, yet. |
@eerhardt Isn't there an issue for that? I think i rember that i've read something about resuing parts of the app host logic or something similar for this? Should i spend time on tests for the cosmosdb now? Or should we wait until the infrastructure is created? |
I think the CosmosDB tests can be written now like the rest of the tests are. That part doesn't need to wait until the infrastructure is created. The tests can follow the existing pattern. |
@eerhardt Where should the cosmosdb server be running? Locally as in the mongodb tests or some remote server as in the storage blob tests? |
For now, I'd do it as a remote server as in the storage blob tests. |
@eerhardt Ok, but what server should we use? |
@eerhardt I tried adding the Testcontainers.CosmosDb to the test project. This breaks all nuget-Dependencies:
Did this also happen at the RabbitMQ tests? |
#359 added support for CosmosDB components. We should ensure these components have all the necessary test coverage - for example logging and tracing tests.
The other components have 2 modes:
I didn't see any tests that actually connect to a server. We should see what it takes to enable that class of tests.
cc @Pilchie
The text was updated successfully, but these errors were encountered: