From f947a6cc4c3846dfdc5a273bb2169384ab241d9b Mon Sep 17 00:00:00 2001 From: Forgind Date: Mon, 31 Jul 2023 09:35:27 -0700 Subject: [PATCH] Look inside one extra folder --- test/EndToEnd/ValidateInsertedManifests.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index 5d9b44df0..cdede126c 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; using FluentAssertions; using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.NET.Sdk.WorkloadManifestReader; @@ -26,16 +23,19 @@ namespace EndToEnd.Tests { var sdkManifestDir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk-manifests"); var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().First(); - foreach (var manifestDir in sdkversionDir.EnumerateDirectories()) + foreach (var manifestVersionDir in sdkversionDir.EnumerateDirectories()) { - var manifestId = manifestDir.Name; + foreach (var manifestDir in manifestVersionDir.EnumerateDirectories()) + { + var manifestId = manifestDir.Name; - string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; + string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; - File.Exists(manifestFile).Should().BeTrue(); - using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); - Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); - readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); + File.Exists(manifestFile).Should().BeTrue(); + using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); + Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); + readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); + } } }