Closed poornas closed 6 years ago
A basic question how are we thinking of making dotnet tests run with mint?
So @poornas proposed that we have a separate Dockerfile that is based on windows image and just runs dotnet tests.
My understanding is that a separate Dockerfile is needed because of Mono (on Linux) doesn't currently work for .NetCore 4.5.2 that we support. @poornas can weigh in more about it.
blocked till further discussion
Not blocked anymore. As discussed, looks like there is a way to run .Net tests on mono and hence the current Docker image itself. @poornas will send the updated PR
@poornas can you pls add WIP
to the title until new changes are added.
Just to clarify there is work to be done here.
this PR can be reviewed - 2 wrinkles though.
@nitisht, updated PR to use streaming wherever possible.
@harshavardhana ,@nitisht - PR's #146,#149 and #150 on minio-dotnet repo need to be merged to master and released before I can remove the local copy of Functional Tests in the mint/run/core/minio-dotnet directory. There are also a couple of TODO's to uncomment before this PR is merged to Mint.Until then, this PR is blocked but can be reviewed.
@poornas as https://github.com/minio/minio-dotnet/pull/146, https://github.com/minio/minio-dotnet/pull/149, https://github.com/minio/minio-dotnet/pull/150 are merged. Marking this as unblocked.
If there is nothing to add here, we can review this.
@NitishT , need this PR https://github.com/minio/minio-dotnet/pull/162 to merge as well into master before we can run dotnet tests on mint.
@poornas https://github.com/minio/minio-dotnet/pull/162 is merged. Can we move ahead on this
@nitisht and @harshavardhana , this can be reviewed - PR updated to pick functional tests with latest release tag.
Will review today @poornas
Tested locally @poornas few cases failed. Here are the logs
$ cat error.log
Unhandled Exception: System.AggregateException: One or more errors occurred. (Unable to load DLL 'kernel32.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)) ---> System.DllNotFoundException: Unable to load DLL 'kernel32.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at Minio.Functional.Tests.FunctionalTest.CreateSymbolicLink(String lpSymlinkFileName, String lpTargetFileName, Int32 dwFlags)
at Minio.Functional.Tests.FunctionalTest.CreateFile(Int32 size, String dataFileName) in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 51
at Minio.Functional.Tests.FunctionalTest.<PutObject_Test5>d__23.MoveNext() in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 401
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Minio.Functional.Tests.FunctionalTest.Main(String[] args) in /mint/run/core/minio-dotnet/FunctionalTest.cs:line 153
./run.sh: line 18: 802 Aborted (core dumped) /mint/run/core/minio-dotnet/out/Minio.Functional.Tests
$ cat output.log
Test: BucketExistsAsync
Test 1: MakeBucketAsync
Test 2 : MakeBucketAsync
Test: RemoveBucketAsync
Test: RemoveBucketAsync succeeded
Test: ListBucketsAsync
Test1: PutobjectAsync with stream
Test1: PutobjectAsync: PutObjectAsync with Stream
Test1: PutobjectAsync with stream complete
Test3: PutobjectAsync with different content-type
Test1: PutobjectAsync: PutObjectAsync with Stream
Test3: PutobjectAsync with different content-type complete
Test4: PutobjectAsync resume upload
Test1: PutobjectAsync: PutObjectAsync with Stream
Test4: PutobjectAsync with different content-type complete
Test5: PutobjectAsync with custom metadata
@nitisht, I had pushed a couple of commits to reference latest version of sdk - the test failure on putobject with metadata seems to indicate that you are running with a older commit.Could you check?
@poornas I tried again using the commit 6888a325d0000c83796b2d338f40cca9b10d63bb
, specifically the mint image play.minio.io/mint:travis-6888a325d0000c83796b2d338f40cca9b10d63bb
. But got the same failure, also I am running it against minio/minio:edge
.
@nitisht, looks like you are using the MINT_DATA_DIR flag to run against a existing data directory. The .net functional tests use kernel32.dll to create a symbolic link to the data files in the specified directory. Tests are failing because this dll is missing on the docker image - I have not found a workaround yet for making this dll available to the docker image (it would be available by default on a full fledged windows environment) . However functional tests should pass if we run without using pre-existing data directory - the typical use case for Mint. I could raise a bug on .net repo/mint to fix this issue separately so that we could go forward with this PR.
@poornas I am just running the Docker image generated by travis
sudo docker run -e "SKIP_TESTS=aws-sdk-php,mc,awscli,aws-sdk-ruby,minio-java,minio-js,minio-py,minio-go" -e "ENABLE_HTTPS=0" --net=host play.minio.io/mint:travis-6888a325d0000c83796b2d338f40cca9b10d63bb
Can you please try this and confirm if you're not getting the error.
@NitishT , yes I see the error with the command you posted - for play the tests.sh script sets the MINT_DATA_DIR variable triggering the symlink bug. I updated my other PR for additional functional tests on dotnet sdk to also eliminate use of symlinks.
@poornas can you pls fix the conflicts? We can take this in as well before we release Mint.
@nitisht , conflicts were fixed.PTAL.
Tested locally run perfectly fine
SERVER_ENDPOINT: 127.0.0.1:9000
ACCESS_KEY: minio
SECRET_KEY: ***REDACTED***
ENABLE_HTTPS: 0
SERVER_REGION: us-east-1
MINT_DATA_DIR: /mint/data
MINT_MODE: core
To get logs, run 'sudo docker cp 170bbcf375e8:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 0 seconds
(2/11) Running aws-sdk-php tests ... done in 41 seconds
(3/11) Running aws-sdk-ruby tests ... done in 1 seconds
(4/11) Running awscli tests ... done in 24 seconds
(5/11) Running mc tests ... done in 4 seconds
(6/11) Running minio-dotnet tests ... done in 40 seconds
(7/11) Running minio-go tests ... done in 29 seconds
(8/11) Running minio-java tests ... done in 6 seconds
(9/11) Running minio-js tests ... done in 21 seconds
(10/11) Running minio-py tests ... done in 10 seconds
(11/11) Running s3cmd tests ... done in 6 seconds
All tests ran successfully
However there is a stray line printed in json
logs
Listed all delete errors for remove objects on miniodotnetv1hnnurml6a9rqe
We need to remove this for the log to be parseable
Sent https://github.com/minio/minio-dotnet/pull/192 Once that is merged, we can release minio-dotnet. This will fix the logging issues.
@poornas can you fix this issue?
Decompressing 100% 5567 ms
Expanding 100% 18013 ms
/mint/run/core/minio-dotnet/Minio.Functional.Tests.csproj(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
The command '/bin/sh -c /mint/build/minio-dotnet/install.sh' returned a non-zero code: 1
Built and tested locally, works fine
SERVER_ENDPOINT: 127.0.0.1:9000
ACCESS_KEY: minio
SECRET_KEY: ***REDACTED***
ENABLE_HTTPS: 0
SERVER_REGION: us-east-1
MINT_DATA_DIR: /mint/data
MINT_MODE: core
To get logs, run 'sudo docker cp 2e0336d2f1cf:/mint/log /tmp/mint-logs'
(1/11) Running aws-sdk-go tests ... done in 0 seconds
(2/11) Running aws-sdk-php tests ... done in 41 seconds
(3/11) Running aws-sdk-ruby tests ... done in 2 seconds
(4/11) Running awscli tests ... done in 24 seconds
(5/11) Running mc tests ... done in 3 seconds
(6/11) Running minio-dotnet tests ... done in 39 seconds
(7/11) Running minio-go tests ... done in 24 seconds
(8/11) Running minio-java tests ... done in 6 seconds
(9/11) Running minio-js tests ... done in 20 seconds
(10/11) Running minio-py tests ... done in 13 seconds
(11/11) Running s3cmd tests ... done in 7 seconds
All tests ran successfully
Functional tests for minio-dotnet Sdk.