Skip to content

Commit

Permalink
Bump xunit/Newtonsoft.Json libs in SB SmokeTests (#16401)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored May 15, 2023
1 parent 72a59e0 commit 8e9a611
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public BasicScenarioTests(ITestOutputHelper outputHelper) : base(outputHelper) {
[MemberData(nameof(GetScenarioObjects))]
public void VerifyScenario(TestScenario scenario) => scenario.Execute(DotNetHelper);

private static IEnumerable<object[]> GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario });
public static IEnumerable<object[]> GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario });

private static IEnumerable<TestScenario> GetScenarios()
public static IEnumerable<TestScenario> GetScenarios()
{
foreach (DotNetLanguage language in Enum.GetValues<DotNetLanguage>())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal static class Config
public static string? PrereqsPath { get; } = Environment.GetEnvironmentVariable(PrereqsPathEnv);
public static string? CustomPackagesPath { get; } = Environment.GetEnvironmentVariable(CustomPackagesPathEnv);
public static string? SdkTarballPath { get; } = Environment.GetEnvironmentVariable(SdkTarballPathEnv);
public static string? SourceBuiltArtifactsPath { get; } = Environment.GetEnvironmentVariable(SourceBuiltArtifactsPathEnv) ??
public static string SourceBuiltArtifactsPath { get; } = Environment.GetEnvironmentVariable(SourceBuiltArtifactsPathEnv) ??
throw new InvalidOperationException($"'{Config.SourceBuiltArtifactsPathEnv}' must be specified");
public static string TargetRid { get; } = Environment.GetEnvironmentVariable(TargetRidEnv) ??
throw new InvalidOperationException($"'{Config.TargetRidEnv}' must be specified");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>

<!-- Pin transitive package versions -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void VerifyVersionFile()
string sdkVersion = versionLines[1];

// Find the expected SDK version by getting it from the SDK tarball
ExtractFileFromTarball(Config.SdkTarballPath, "./sdk/*/.version", outputDir);
ExtractFileFromTarball(Config.SdkTarballPath ?? string.Empty, "./sdk/*/.version", outputDir);
DirectoryInfo sdkDir = new DirectoryInfo(Path.Combine(outputDir, "sdk"));
string sdkVersionPath = sdkDir.GetFiles(".version", SearchOption.AllDirectories).Single().FullName;
string[] sdkVersionLines = File.ReadAllLines(Path.Combine(outputDir, sdkVersionPath));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public WebScenarioTests(ITestOutputHelper outputHelper) : base(outputHelper) { }
[MemberData(nameof(GetScenarioObjects))]
public void VerifyScenario(TestScenario scenario) => scenario.Execute(DotNetHelper);

private static IEnumerable<object[]> GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario });
public static IEnumerable<object[]> GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario });

private static IEnumerable<TestScenario> GetScenarios()
{
Expand Down

0 comments on commit 8e9a611

Please sign in to comment.