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 eventing to test builder. #6682

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Nov 14, 2024

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

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No (not required)
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

@mitchdenny mitchdenny added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing labels Nov 14, 2024
@mitchdenny mitchdenny added this to the 9.1 milestone Nov 14, 2024
@mitchdenny mitchdenny self-assigned this Nov 14, 2024
@DamianEdwards
Copy link
Member

@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
Copy link
Member Author

Or we could look at making the test builder derive?

@DamianEdwards
Copy link
Member

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
Copy link
Member

JamesNK commented Nov 16, 2024

@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
Copy link
Member

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

@mitchdenny
Copy link
Member Author

I'll add a test.

@mitchdenny mitchdenny force-pushed the mitchdenny/add-eventing-to-test-builder branch from 2aee9d5 to 7394ebd Compare November 21, 2024 02:16
@mitchdenny
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mitchdenny
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mitchdenny mitchdenny merged commit b0d7319 into main Nov 21, 2024
9 checks passed
@mitchdenny mitchdenny deleted the mitchdenny/add-eventing-to-test-builder branch November 21, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose IDistributedApplicationEventing on IDistributedApplicationTestingBuilder
3 participants