Skip to content

Add Aspire service tests#43295

Closed
tmat wants to merge 2 commits intodotnet:mainfrom
tmat:AspireServiceTests
Closed

Add Aspire service tests#43295
tmat wants to merge 2 commits intodotnet:mainfrom
tmat:AspireServiceTests

Conversation

@tmat
Copy link
Copy Markdown
Member

@tmat tmat commented Sep 10, 2024

Ports tests from WebTools.

@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Sep 10, 2024
akoeplinger added a commit that referenced this pull request Sep 12, 2024
…ler.cs (#43377)

While looking at why #43295 is having issues running on Helix I noticed that we were passing ``-class "Microsoft.WebTools.AspireServer.UnitTests.MockFactory`1"`` to the test script which caused a parse error because of the backtick.

We shouldn't pass generic types since xunit can't do anything with it.

Additionally I noticed that we were passing some nested types even though they were internal.
This is because we didn't check the visibility correctly, we must use `TypeAttributes.VisibilityMask` to check for just the visibility (the same also applies to checking for class).
See https://learn.microsoft.com/en-us/dotnet/api/system.reflection.typeattributes?view=net-8.0&redirectedfrom=MSDN#examples
@tmat tmat closed this Sep 17, 2024
@tmat
Copy link
Copy Markdown
Member Author

tmat commented Sep 17, 2024

Moving to 9.0.1xx: #43515

tmat pushed a commit to tmat/sdk that referenced this pull request Sep 18, 2024
…ler.cs (dotnet#43377)

While looking at why dotnet#43295 is having issues running on Helix I noticed that we were passing ``-class "Microsoft.WebTools.AspireServer.UnitTests.MockFactory`1"`` to the test script which caused a parse error because of the backtick.

We shouldn't pass generic types since xunit can't do anything with it.

Additionally I noticed that we were passing some nested types even though they were internal.
This is because we didn't check the visibility correctly, we must use `TypeAttributes.VisibilityMask` to check for just the visibility (the same also applies to checking for class).
See https://learn.microsoft.com/en-us/dotnet/api/system.reflection.typeattributes?view=net-8.0&redirectedfrom=MSDN#examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant