Skip to content

Commit f33b3e4

Browse files
authored
Fixed version in tests (#4790)
1 parent f8d273c commit f33b3e4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/DotnetTestTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ namespace Microsoft.TestPlatform.AcceptanceTests;
1111
[TestClass]
1212
public class DotnetTestTests : AcceptanceTestBase
1313
{
14+
private static string GetFinalVersion(string version)
15+
{
16+
var end = version.IndexOf("-release");
17+
return (end >= 0) ? version.Substring(0, end) : version;
18+
}
19+
1420
[TestMethod]
1521
// patched dotnet is not published on non-windows systems
1622
[TestCategory("Windows-Review")]
@@ -23,7 +29,7 @@ public void RunDotnetTestWithCsproj(RunnerInfo runnerInfo)
2329
InvokeDotnetTest($@"{projectPath} --logger:""Console;Verbosity=normal"" /p:PackageVersion={IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion}");
2430

2531
// ensure our dev version is used
26-
StdOutputContains(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion);
32+
StdOutputContains(GetFinalVersion(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion));
2733
ValidateSummaryStatus(1, 1, 1);
2834
ExitCodeEquals(1);
2935
}
@@ -40,7 +46,7 @@ public void RunDotnetTestWithDll(RunnerInfo runnerInfo)
4046
InvokeDotnetTest($@"{assemblyPath} --logger:""Console;Verbosity=normal""");
4147

4248
// ensure our dev version is used
43-
StdOutputContains(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion);
49+
StdOutputContains(GetFinalVersion(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion));
4450
ValidateSummaryStatus(1, 1, 1);
4551
ExitCodeEquals(1);
4652
}

0 commit comments

Comments
 (0)