You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run pactnet provider tests under .net core 3.0 in ubuntu run via wsl in docker container and it fails with System.ComponentModel.Win32Exception : No such file or directory.
When I run same tests under windows then everything works just fine.
It seems that PactVerifier fails to run bash script using System.Diagnostics.Process.Start(). Could it be related to .net core version? I tried .net core 3.0 and .net core 2.2 with same result.
Here is the full stack trace of the exception: A total of 1 test files matched the specified pattern. X EnsureAgreementPricesApiHonorsPactWithConsumer [1s 43ms] Error Message: System.ComponentModel.Win32Exception : No such file or directory Stack Trace: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at PactNet.Core.PactCoreHost'1.Start() at PactNet.PactVerifier.Verify(String description, String providerState) at Scalepoint.EasyAdmin.Provider.ProviderTestBase.VerifyPactAsync(String provider, String consumer) in /build/pact/Scalepoint.EasyAdmin.Provider/ProviderTestBase.cs:line 57 at Scalepoint.EasyAdmin.Provider.AgreementPrices.AgreementPricesApiProviderTests.EnsureAgreementPricesApiHonorsPactWithConsumer() in /build/pact/Scalepoint.EasyAdmin.Provider/AgreementPrices/AgreementPricesApiProviderTests.cs:line 12 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter'1.BlockUntilCompleted() at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func'1 invoke) at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context) at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context) at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork() Results File: /build/artifacts/test-results/_db3ce2ca738c_2019-11-14_12_26_57.trx
I checked path to the script that is used for Process.Start() call and it seems to be correct. Maybe it's related to this issue: dotnet/core#1857
Any help is appreciated.
Thank you in advance.
The text was updated successfully, but these errors were encountered:
@ewgenym I'm not really doing much .NET these days, so haven't been keeping up with the Core version updates. Are you interested in taking a look? I'm guessing it's related to the issue you linked. Otherwise if you could create a sample reproduction project, that would be great.
Hello
Finally I figured out that the problem was with docker container that was missing some packages.
Here is the description of the problem I faced and solution: pact-foundation/pact-js#305
Hello
I'm trying to run pactnet provider tests under .net core 3.0 in ubuntu run via wsl in docker container and it fails with
System.ComponentModel.Win32Exception : No such file or directory.
When I run same tests under windows then everything works just fine.
It seems that PactVerifier fails to run bash script using
System.Diagnostics.Process.Start()
. Could it be related to .net core version? I tried .net core 3.0 and .net core 2.2 with same result.Here is the full stack trace of the exception:
A total of 1 test files matched the specified pattern. X EnsureAgreementPricesApiHonorsPactWithConsumer [1s 43ms] Error Message: System.ComponentModel.Win32Exception : No such file or directory Stack Trace: at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at PactNet.Core.PactCoreHost'1.Start() at PactNet.PactVerifier.Verify(String description, String providerState) at Scalepoint.EasyAdmin.Provider.ProviderTestBase.VerifyPactAsync(String provider, String consumer) in /build/pact/Scalepoint.EasyAdmin.Provider/ProviderTestBase.cs:line 57 at Scalepoint.EasyAdmin.Provider.AgreementPrices.AgreementPricesApiProviderTests.EnsureAgreementPricesApiHonorsPactWithConsumer() in /build/pact/Scalepoint.EasyAdmin.Provider/AgreementPrices/AgreementPricesApiProviderTests.cs:line 12 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter'1.BlockUntilCompleted() at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func'1 invoke) at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context) at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context) at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork() Results File: /build/artifacts/test-results/_db3ce2ca738c_2019-11-14_12_26_57.trx
I checked path to the script that is used for Process.Start() call and it seems to be correct. Maybe it's related to this issue: dotnet/core#1857
Any help is appreciated.
Thank you in advance.
The text was updated successfully, but these errors were encountered: