Skip to content

Commit d687df1

Browse files
Copilotradical
andcommitted
Fix helix templates tests: strip class: prefix from test names
The send-to-helix-templatestests.targets was reading test class names from .tests.list file which contains entries like "class:Aspire.Templates.Tests.ClassName". It was using these entries directly without stripping the "class:" prefix, causing issues in helix when the prefix was used as part of filenames or commands. Now strips the "class:" prefix before using the test class names in helix work items. Co-authored-by: radical <[email protected]>
1 parent 98f40e5 commit d687df1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/helix/send-to-helix-templatestests.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@
3232
</PropertyGroup>
3333

3434
<ReadLinesFromFile File="$(TestArchiveTestsDirForTemplateTests)$(TestProjectName).tests.list">
35-
<Output TaskParameter="Lines" ItemName="_TemplateTestsClassNames" />
35+
<Output TaskParameter="Lines" ItemName="_TemplateTestsClassNamesRaw" />
3636
</ReadLinesFromFile>
3737

38+
<!-- Strip class: prefix from test class names -->
39+
<ItemGroup>
40+
<_TemplateTestsClassNames Include="@(_TemplateTestsClassNamesRaw->'%(Identity)'->Replace('class:', ''))" />
41+
</ItemGroup>
42+
3843
<Error Condition="@(_TemplateTestsClassNames->Count()) == 0"
3944
Text="No workload test class names found" />
4045

0 commit comments

Comments
 (0)