Skip to content

Allow configuring volume behavior when using Aspire.Hosting.Testing  #4462

@DamianEdwards

Description

@DamianEdwards

Currently, when testing AppHost projects that include container resources configured to use volumes, the same volumes are used in the test as that are used in normal development. This isn't great because the test isn't as isolated from the normal running of the AppHost as it could be and could mutate the data in the volume.

We should allow for configuring the behavior of volumes when using Aspire.Hosting.Testing, and by default remove volumes from all container resources under test so that they are better isolated. Volume behavior should be configurable globally for all resources, or on a per resource basis (overriding the configured global behavior), by way of new API to support both scenarios.

Metadata

Metadata

Assignees

Labels

area-app-testingIssues pertaining to the APIs in Aspire.Hosting.Testing

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions