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

Fix minio-go tests as per the latest changes in minio-go library. #68

Merged
merged 2 commits into from
Jul 3, 2017

Conversation

nitisht
Copy link
Contributor

@nitisht nitisht commented Jul 3, 2017

Minio-go introduced new api and changed copy objects api (minio/minio-go@129fe89).

This broke mint tests. The PR updates mint minio-go tests as per minio-go SDK.

Note:
Once minio/minio-go#727 is merged. Mint will be updated to pull tests from minio-go SDK and we'll not maintain multiple copies of the minio-go SDK tests.

"fmt"
"io"
"io/ioutil"
"math/rand"
Copy link
Member

Choose a reason for hiding this comment

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

This formatting is all off

$ gofmt -s -d minio-go-tests.go
-    testBucketNotification()
-    testFunctional()
-    testGetObjectObjectModified()
-    testPutObjectUploadSeekedObject()
-    testComposeMultipleSources()
-    testComposeObjectErrorCases()
-    log.Info("Functional tests complete for minio-go sdk")
+	log.Info("Running functional tests for minio-go sdk....")
+	testMakeBucketError()
+	testMakeBucketRegions()
+	testPutObjectWithMetadata()
+
+	testPutObjectReadAt()
+
+	testPutObjectStreaming()
+	testListPartiallyUploaded()
+	testGetObjectSeekEnd()
+	testGetObjectClosedTwice()
+	testRemoveMultipleObjects()
+	testRemovePartiallyUploaded()
+	testFPutObjectMultipart()
+	testFPutObject()
+	testGetObjectReadSeekFunctional()
+	testGetObjectReadAtFunctional()
+	testPresignedPostPolicy()
+	testCopyObject()
+	testEncryptionPutGet()
+	testBucketNotification()
+	testFunctional()
+	testGetObjectObjectModified()
+	testPutObjectUploadSeekedObject()
+	testComposeMultipleSources()
+	testComposeObjectErrorCases()
+	log.Info("Functional tests complete for minio-go sdk")
 }

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

commit 251c6567df9aab706528889f81ab85ee6da99051
Author: Nitish Tiwar <nitish@minio.io>
Date:   Sun Jul 2 22:24:13 2017 -0700

    Fix minio-go tests as per the latest changes in minio-go library.
    
    - Minio-go introduced new api and changed copy objects api (https://github.com/minio/minio-go/commit/129fe893b2ac95d322d531b7029981f71c351e53).
    This broke mint tests.

Commit message shouldn't be wrapped around in this manner - avoid bullets if only one element.

@nitisht
Copy link
Contributor Author

nitisht commented Jul 3, 2017

Amended the previous commit. @harshavardhana

// Copy source.
copySource := bucketName + "/" + objectName
dst, err := minio.NewDestinationInfo(bucketName+"-copy", objectName+"-copy", nil, nil)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Tabbing error here.. dst and if are off by one space.

@@ -2418,6 +2420,132 @@ func logTrace() {
log.Info(fmt.Sprintf("Running %s at line:%d", f.Name(), line))
}

func testComposeObjectErrorCases() {

// Instantiate new minio client object.
Copy link
Member

Choose a reason for hiding this comment

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

This comment is off just run gofmt -s -w -l on the file it should fix itself properly.

@nitisht nitisht requested review from krisis and removed request for poornas July 3, 2017 06:05
@nitisht
Copy link
Contributor Author

nitisht commented Jul 3, 2017

@krisis could you pls take a look.

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.

LGTM. To simplify testing while reviewing PR, we can make automated docker image builds for mint for each PR. E.g mesosphere/universe repo builds docker image for each PR (re)submission - https://hub.docker.com/r/mesosphere/universe-server/tags/.

@nitisht nitisht merged commit edf0c57 into minio:master Jul 3, 2017
@nitisht nitisht deleted the minio-go-test-fix branch July 4, 2017 07:51
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

3 participants