Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for mustGetPutObjReader (0.21 sec)

  1. cmd/erasure-object_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	// PutObjectPart should succeed even if part already exists. ref: https://github.com/minio/minio/issues/1930
    	_, err = objLayer.PutObjectPart(ctx, "bucket1", "mpartObj1", res.UploadID, 1, mustGetPutObjReader(t, bytes.NewReader(fiveMBBytes), 5*humanize.MiByte, md5Hex, ""), opts)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  2. cmd/object_api_suite_test.go

    	{
    		_, err = obj.PutObject(context.Background(), "bucket", "newPrefix", mustGetPutObjReader(t, bytes.NewBufferString(uploadContent), int64(len(uploadContent)), "", ""), opts)
    		if err != nil {
    			t.Fatalf("%s: <ERROR> %s", instanceType, err)
    		}
    		_, err = obj.PutObject(context.Background(), "bucket", "newPrefix2", mustGetPutObjReader(t, bytes.NewBufferString(uploadContent), int64(len(uploadContent)), "", ""), opts)
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  3. cmd/erasure-healing_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	oi1, err := obj.PutObject(ctx, bucket, object, mustGetPutObjReader(t, bytes.NewReader(data), length, "", ""), ObjectOptions{})
    	if err != nil {
    		t.Fatal(err)
    	}
    	// 2nd version.
    	_, _ = rand.Read(data)
    	oi2, err := obj.PutObject(ctx, bucket, object, mustGetPutObjReader(t, bytes.NewReader(data), length, "", ""), ObjectOptions{})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 47.6K bytes
    - Viewed (0)
  4. cmd/object-api-putobject_test.go

    			inputMeta:     map[string]string{"etag": "e2fc714c4727ee9395f324cd2e7f331f", "x-amz-checksum-crc32": "abcd"},
    			inputDataSize: int64(len("abcd")),
    		},
    	}
    	for i, testCase := range testCases {
    		in := mustGetPutObjReader(t, bytes.NewReader(testCase.inputData), testCase.inputDataSize, testCase.inputMeta["etag"], testCase.inputSHA256)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  5. cmd/erasure-healing-common_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	for i, test := range testCases {
    		test := test
    		t.Run(fmt.Sprintf("case-%d", i), func(t *testing.T) {
    			_, err = obj.PutObject(ctx, bucket, object, mustGetPutObjReader(t, bytes.NewReader(data), int64(len(data)), "", ""), ObjectOptions{})
    			if err != nil {
    				t.Fatalf("Failed to putObject %v", err)
    			}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 23K bytes
    - Viewed (1)
  6. cmd/object-api-listobjects_test.go

    	}
    	for _, object := range testObjects {
    		md5Bytes := md5.Sum([]byte(object.content))
    		_, err = obj.PutObject(context.Background(), object.parentBucket, object.name, mustGetPutObjReader(t, bytes.NewBufferString(object.content),
    			int64(len(object.content)), hex.EncodeToString(md5Bytes[:]), ""), ObjectOptions{
    			Versioned:   globalBucketVersioningSys.PrefixEnabled(object.parentBucket, object.name),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
  7. cmd/object-api-multipart_test.go

    	}
    
    	// Validate all the test cases.
    	for i, testCase := range testCases {
    		actualInfo, actualErr := obj.PutObjectPart(context.Background(), testCase.bucketName, testCase.objName, testCase.uploadID, testCase.PartID, mustGetPutObjReader(t, bytes.NewBufferString(testCase.inputReaderData), testCase.inputDataSize, testCase.inputMd5, testCase.inputSHA256), opts)
    		// All are test cases above are expected to fail.
    		if actualErr != nil && testCase.shouldPass {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  8. cmd/object-handlers_test.go

    	}
    	// iterate through the above set of inputs and upload the object.
    	for i, input := range putObjectInputs {
    		// uploading the object.
    		_, err := obj.PutObject(context.Background(), input.bucketName, input.objectName, mustGetPutObjReader(t, bytes.NewReader(input.textData), input.contentLength, input.metaData[""], ""), ObjectOptions{UserDefined: input.metaData})
    		// if object upload fails stop the test.
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  9. cmd/bucket-handlers_test.go

    func testRemoveBucketHandler(obj ObjectLayer, instanceType, bucketName string, apiRouter http.Handler,
    	credentials auth.Credentials, t *testing.T,
    ) {
    	_, err := obj.PutObject(GlobalContext, bucketName, "test-object", mustGetPutObjReader(t, bytes.NewReader([]byte{}), int64(0), "", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"), ObjectOptions{})
    	// if object upload fails stop the test.
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 39.5K bytes
    - Viewed (2)
  10. cmd/test-utils_test.go

    		17 + // ";chunk-signature="
    		64 + // e.g. "f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2"
    		2 + // CRLF
    		chunkDataSize +
    		2 // CRLF
    }
    
    func mustGetPutObjReader(t TestErrHandler, data io.Reader, size int64, md5hex, sha256hex string) *PutObjReader {
    	hr, err := hash.NewReader(context.Background(), data, size, md5hex, sha256hex, size)
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
Back to top