dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.93k stars 480 forks source link

Add eventing to test builder. #6682

Closed mitchdenny closed 4 days ago

mitchdenny commented 1 week ago

Description

We missed this. It was added to the test builder we use for our internal tests, but not the public API that we ship. Quick fix.

Fixes #6681

Checklist

DamianEdwards commented 1 week ago

@mitchdenny should we think about adding a test that verifies that members added to DistributedApplicationBuilder are exposed on the test builder? I imagine something that will fail whenever a new member is added that then requires either updating the test builder to expose it, or updating the test to explicitly confirm that we don't want to expose it.

mitchdenny commented 1 week ago

Or we could look at making the test builder derive?

DamianEdwards commented 1 week ago

Would be a bigger (breaking?) change to change inheritance wouldn't it? Open to it, just wondering if there's something more pragmatic for the shorter term.

JamesNK commented 1 week ago

@mitchdenny should we think about adding a test that verifies that members added to DistributedApplicationBuilder are exposed on the test builder? I imagine something that will fail whenever a new member is added that then requires either updating the test builder to expose it, or updating the test to explicitly confirm that we don't want to expose it.

+1. Add a test with reflection over both. If the test builder is missing something from DistributedApplicationBuilder then throw an error unless in an allow list. New property on DistributedApplicationBuilder requires either adding it to test builder or adding it to allow list.

DamianEdwards commented 1 week ago

@mitchdenny are you planning to add a test as suggested, or log a follow-up issue?

mitchdenny commented 6 days ago

I'll add a test.

mitchdenny commented 4 days ago

/azp run

azure-pipelines[bot] commented 4 days ago
Azure Pipelines successfully started running 1 pipeline(s).
mitchdenny commented 4 days ago

/azp run

azure-pipelines[bot] commented 4 days ago
Azure Pipelines successfully started running 1 pipeline(s).