dotnet / scenario-tests

Scenario testing for installed .NET Core SDKs
MIT License
5 stars 7 forks source link

Adding more Web Tests and Helper/Test for Pre-Made Solution #41

Closed mattscheffer closed 9 months ago

mattscheffer commented 10 months ago

@mmitche Can you review when you have some time?

mmitche commented 10 months ago

Will do

mattscheffer commented 9 months ago

Error is here: System.IO.DirectoryNotFoundException : Existing Directory not found: D:\a\1\s\src\Microsoft.DotNet.ScenarioTests.SdkTemplateTests\SampleProject at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.DotNetSdkHelper.CopyHelper(String projectDirectory, String existing, Boolean recursive) in //src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/DotNetSdkHelper.cs:line 324 at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTest.Execute(DotNetSdkHelper dotNetHelper, String testRoot, String[] frameworks, String PreMadeSolution) in //src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTest.cs:line 51 at Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTests.VerifyPreMadeSolution() in /_/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs:line 207 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Based on the exception trace, it's not finding the files. The code thinks the output Directory is at D:\a\1\s\src\Microsoft.DotNet.ScenarioTests.SdkTemplateTests rather than D:\a\1\s\artifacts\bin\Microsoft.DotNet.ScenarioTests.SdkTemplateTests\Release\net8.0\

This is something that's working locally but not here. The file structure seems the same so I'm not yet sure why it's trying to look in the wrong spot.

mattscheffer commented 9 months ago

@mmitche Can you re-run checks here. The only error in this (hopefully final batch) seems to be what I suspect is an intermittent one that didn't trigger on any of the other skus. I don't appear to have permission to do so.

[FAIL] Microsoft.DotNet.ScenarioTests.SdkTemplateTests.SdkTemplateTests.VerifyWebAPITemplate(language: CSharp) System.InvalidOperationException : Failed to execute /Users/runner/work/1/s/.dotnet/dotnet run /bl:/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/Z2j96w/SdkTemplateTest_WebApi_CSharp/run.binlog Exit code: 134 Building... fail: Microsoft.Extensions.Hosting.Internal.Host[11] Hosting failed to start System.IO.IOException: Failed to bind to address http://127.0.0.1:5057/: address already in use.

mmitche commented 9 months ago

@mattscheffer LGTM, let me know if you want me to merge this.

mattscheffer commented 9 months ago

@mmitche You're good to merge whenever. Thanks!