Skip to content

[Feature]: Allow access to the configuration builder in DistributedApplicationTestingBuilder.CreateAsync in TUnit.Aspire #5199

@redoz

Description

@redoz

Problem Statement

I'm trying to get access to the to the configureBuilder param in DistributedApplicationTestingBuilder.CreateAsync used here
It seems like maybe it could be handled the same way as AppFixture.Args?
If you're willing to take a PR let me know, I should have some time this weekend.

Thanks for all the effort you've put into TUnit, it's working out fantastically for our use-case.

Proposed Solution

Add a protected virtual to AppFixture similar to protected virtual string[] Args => []; something like:
protected virtual Action<DistributedApplicationOptions,HostApplicationBuilderSettings> ConfigureCallback => static (_, _) => return; and pass it to DistributedApplicationTestingBuilder.CreateAsync

Alternatives Considered

I did some poking around but I didn't see another way of getting access other than through the CreateAsync function. You could copy/paste the whole InitializeAsync but that could cause hard to find issues if the internal implementation changes since it wouldn't be called anymore.

Feature Category

Other

How important is this feature to you?

Important - significantly impacts my workflow

Additional Context

No response

Contribution

  • I'm willing to submit a pull request for this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions