Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .NET functional tests to Mint #64

Merged
merged 1 commit into from
Nov 29, 2017
Merged

Add .NET functional tests to Mint #64

merged 1 commit into from
Nov 29, 2017

Conversation

poornas
Copy link
Contributor

@poornas poornas commented Jul 1, 2017

Functional tests for minio-dotnet Sdk.

  • this is wip as multipart uploads are failing on the docker image but not on native environment.

@harshavardhana
Copy link
Member

A basic question how are we thinking of making dotnet tests run with mint?

@nitisht
Copy link
Contributor

nitisht commented Jul 2, 2017

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.

@nitisht nitisht added the blocked label Jul 3, 2017
@nitisht
Copy link
Contributor

nitisht commented Jul 3, 2017

blocked till further discussion

@nitisht nitisht removed the blocked label Jul 3, 2017
@nitisht
Copy link
Contributor

nitisht commented Jul 3, 2017

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

@deekoder deekoder requested review from nitisht and removed request for krisis July 4, 2017 00:37
@nitisht
Copy link
Contributor

nitisht commented Jul 4, 2017

@poornas can you pls add WIP to the title until new changes are added.

Just to clarify there is work to be done here.

@poornas poornas changed the title Add minio-dotnet functional tests [wip]Add minio-dotnet functional tests Jul 4, 2017
@poornas poornas changed the title [wip]Add minio-dotnet functional tests [wip] Add minio-dotnet functional tests Jul 4, 2017
@poornas poornas changed the title [wip] Add minio-dotnet functional tests Add minio-dotnet functional tests Jul 5, 2017
@poornas
Copy link
Contributor Author

poornas commented Jul 5, 2017

this PR can be reviewed - 2 wrinkles though.

  1. The dotnet dependencies are not being cleaned up because the dotnet publish step doesnt generate a executable.
  2. multipart put/copy are failing - this is an SDK problem and a separate issue has been raised. The 3-4 tests that fail have been commented out for now.

Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes look good. Disposing MemoryStream needs to be handled in some places.
Test result:
No executable found matching command "dotnet-/mint/run/core/minio-dotnet/out/Minio.Functional.Tests.dll"

Console.WriteLine("[Bucket] Exception: {0}", e);
Assert.Fail();
}
await TearDown(minio, bucketName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't filestream be disposed in the finally block or alternately use using block to implicitly dispose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krisis, done.

private static int MB = 1024 * 1024;

// Create a file of given size from random byte array
private static String CreateFile(int size)
Copy link
Contributor

@nitisht nitisht Jul 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove local CreateFile

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poornas
Copy link
Contributor Author

poornas commented Jul 6, 2017

@nitisht, updated PR to use streaming wherever possible.

@poornas poornas changed the title Add minio-dotnet functional tests [wip] Add minio-dotnet functional tests Jul 8, 2017
@poornas poornas added the blocked label Jul 8, 2017
@poornas
Copy link
Contributor Author

poornas commented Jul 8, 2017

@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 poornas changed the title [wip] Add minio-dotnet functional tests [wip] Add .NET functional tests to Mint Jul 19, 2017
@nitisht
Copy link
Contributor

nitisht commented Aug 2, 2017

@poornas as minio/minio-dotnet#146, minio/minio-dotnet#149, minio/minio-dotnet#150 are merged. Marking this as unblocked.

If there is nothing to add here, we can review this.

@nitisht nitisht removed the blocked label Aug 2, 2017
@poornas
Copy link
Contributor Author

poornas commented Aug 12, 2017

@nitisht , need this PR minio/minio-dotnet#162 to merge as well into master before we can run dotnet tests on mint.

@nitisht
Copy link
Contributor

nitisht commented Aug 29, 2017

@poornas minio/minio-dotnet#162 is merged. Can we move ahead on this

@nitisht
Copy link
Contributor

nitisht commented Sep 12, 2017

@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.

@poornas
Copy link
Contributor Author

poornas commented Sep 13, 2017

@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 poornas closed this Sep 13, 2017
@poornas poornas reopened this Sep 13, 2017
@nitisht
Copy link
Contributor

nitisht commented Nov 24, 2017

@poornas can you pls fix the conflicts? We can take this in as well before we release Mint.

@poornas poornas force-pushed the mdotnet branch 2 times, most recently from 8012bbd to 2f5a932 Compare November 24, 2017 10:56
@poornas
Copy link
Contributor Author

poornas commented Nov 25, 2017

@nitisht , conflicts were fixed.PTAL.

set -e

MINIO_DOTNET_SDK_PATH="$MINT_RUN_CORE_DIR/minio-dotnet"
MINIO_DOTNET_SDK_VERSION="1.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably follow the approach to automatically pull the latest SDK version, as done in other SDKs. Like this

MINIO_DOTNET_VERSION=$(curl -s https://api.github.com/repos/minio/minio-dotnet/releases/latest | jq -r .tag_name)
if [ -z "$MINIO_DOTNET_VERSION" ]; then
    echo "unable to get minio-dotnet version from github"
    exit 1
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do this @poornas

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,done.

@nitisht
Copy link
Contributor

nitisht commented Nov 25, 2017

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

@nitisht
Copy link
Contributor

nitisht commented Nov 25, 2017

Sent minio/minio-dotnet#192
Once that is merged, we can release minio-dotnet. This will fix the logging issues.

MINIO_DOTNET_SDK_PATH="$MINT_RUN_CORE_DIR/minio-dotnet"
MINIO_DOTNET_SDK_VERSION="1.0.3"

outDir="$MINIO_DOTNET_SDK_PATH/out"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, changed this.

apt-transport-https
dotnet-dev-1.0.4
nuget
libunwind8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@@ -4,3 +4,5 @@ python3-pip
ruby-dev
ruby-bundler
default-jdk
dotnet
nuget
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@poornas poornas changed the title [wip] Add .NET functional tests to Mint Add .NET functional tests to Mint Nov 27, 2017
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM & Tested

@harshavardhana
Copy link
Member

@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

@poornas poornas force-pushed the mdotnet branch 2 times, most recently from 57b116d to ca2c01b Compare November 28, 2017 07:26
Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis build failures need to be fixed..

@nitisht
Copy link
Contributor

nitisht commented Nov 29, 2017

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

@nitisht nitisht merged commit 9bdc5cb into minio:master Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants