Skip to content

Commit

Permalink
Fixed version in tests (#4790)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvpoienaru committed Dec 11, 2023
1 parent f8d273c commit f33b3e4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace Microsoft.TestPlatform.AcceptanceTests;
[TestClass]
public class DotnetTestTests : AcceptanceTestBase
{
private static string GetFinalVersion(string version)
{
var end = version.IndexOf("-release");
return (end >= 0) ? version.Substring(0, end) : version;
}

[TestMethod]
// patched dotnet is not published on non-windows systems
[TestCategory("Windows-Review")]
Expand All @@ -23,7 +29,7 @@ public void RunDotnetTestWithCsproj(RunnerInfo runnerInfo)
InvokeDotnetTest($@"{projectPath} --logger:""Console;Verbosity=normal"" /p:PackageVersion={IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion}");

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

// ensure our dev version is used
StdOutputContains(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion);
StdOutputContains(GetFinalVersion(IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion));
ValidateSummaryStatus(1, 1, 1);
ExitCodeEquals(1);
}
Expand Down

0 comments on commit f33b3e4

Please sign in to comment.