-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Im using Mongo2Go 2.2.8 with Xunit, targeting framework netcoreapp2.1
In Windows everything works fine, but in Linux (Docker Container from microsoft/dotnet:2.1.302-sdk-alpine3.7) when I try to execute "dotnet test" I get the following error "System.ComponentModel.Win32Exception"
First I had some problems with the locate of binaries and I fixed with:
var _runner = MongoDbRunner.Start("MongoData/", "tools/mongodb-linux*/bin", "/root/.nuget/packages/mongo2go/2.2.8");
I checked permissions inside container on folder "MongoData" (generated in /bin/debug/netcoreapp2.1/) and in the folder of binaries, all are root:root. The binaries have the execute bit.
UPDATE:
If I run dotnet test from my linux machine (Centos7), everything works fine, its a problem with container.
Any ideas ?
Stack Trace is:
Failed SendAsync Test Valid
Error Message: System.ComponentModel.Win32Exception : No such file or directory
Stack Trace:
at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setUser, UInt32 userId, UInt32 groupId, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Mongo2Go.Helper.ProcessControl.StartAndWaitForReady(Process process, Int32 timeoutInSeconds, String processReadyIdentifier, String windowTitle)
at Mongo2Go.Helper.MongoDbProcessStarter.Start(String binariesDirectory, String dataDirectory, Int32 port, Boolean doNotKill, Boolean singleNodeReplSet)
at Mongo2Go.MongoDbRunner..ctor(IPortPool portPool, IFileSystem fileSystem, IMongoDbProcessStarter processStarter, IMongoBinaryLocator mongoBin, String dataDirectory, Boolean singleNodeReplSet)
at Mongo2Go.MongoDbRunner.Start(String dataDirectory, String binariesSearchPatternOverride, String binariesSearchDirectory, Boolean singleNodeReplSet)