Skip to content
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

Add component + hosting integration testing #937

Closed
eerhardt opened this issue Nov 17, 2023 · 4 comments
Closed

Add component + hosting integration testing #937

eerhardt opened this issue Nov 17, 2023 · 4 comments
Assignees
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication testing ☑️

Comments

@eerhardt
Copy link
Member

We should add some integration tests which cover off spinning up a container for component X and connecting to it from within a service.

For example, we should have an integration test project which spins up all the containers we possibly can and connects to them from a service as part of a test run. The test might take a bunch of resources (memory/cpu time) but I don't think we have anything that would detect if things broke right now.

a rough sketch of what it could look like today:

  • AppHost spins up containers for:
    • postgres db
    • sql db
    • redis
    • rabbitmq
  • Then the test app adds all those components in "Main", including redundant ones:
    • EF npgsql
    • npgsql
    • EF sql
    • sql
    • redis
    • rabbitmq
  • And then the test ensures all the correct DI services can be resolved, and tries 1 operation on each

I'm putting this under "area-app-model" for now because the hard part is automating the first part. Once we have a test which spins up the AppHost, adding the component part to the test is trivial.

cc @mitchdenny

@eerhardt eerhardt added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Nov 17, 2023
@davidfowl davidfowl added this to the preview 3 (Jan) milestone Nov 24, 2023
@mitchdenny
Copy link
Member

I think we've made good progress here over the last month, but we need to double check that that we are exercising each component. Additionally we need to make sure these test cases can run during CI. We should also support testing against Azure and other cloud providers for resource/component types for those environments.

@mitchdenny
Copy link
Member

@JamesNK this just needs to be checked off now to make sure all the components are well represented (where they can run locally with external cloud dependencies).

@radical
Copy link
Member

radical commented Mar 7, 2024

#2534 has been merged. Are there any pending TODO items here?

@radical
Copy link
Member

radical commented Mar 11, 2024

Marking this as closed by #2534 .

@radical radical closed this as completed Mar 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication testing ☑️
Projects
None yet
Development

No branches or pull requests

7 participants