- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for newTestRequest (1.96 sec)
-
cmd/bucket-handlers_test.go
} } // Test for Anonymous/unsigned http request. // ListBucketsHandler doesn't support bucket policies, setting the policies shouldn't make any difference. anonReq, err := newTestRequest(http.MethodGet, getBucketLocationURL("", bucketName), 0, nil) if err != nil { t.Fatalf("MinIO %s: Failed to create an anonymous request.", instanceType) }
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 39.8K bytes - Viewed (0) -
cmd/admin-handlers_test.go
queryVal := url.Values{} queryVal.Set("action", string(cmd.toServiceAction())) queryVal.Set("type", "2") resource := adminPathPrefix + adminAPIVersionPrefix + "/service?" + queryVal.Encode() req, err := newTestRequest(http.MethodPost, resource, 0, nil) if err != nil { return nil, err } // management REST API uses signature V4 for authentication. err = signRequestV4(req, cred.AccessKey, cred.SecretKey)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 13.9K bytes - Viewed (0) -
cmd/bucket-policy-handlers_test.go
bucketPolicyStr := fmt.Sprintf(bucketPolicyTemplate, bucketName, bucketName) // create unsigned HTTP request for PutBucketPolicyHandler. anonReq, err := newTestRequest(http.MethodPut, getPutPolicyURL("", bucketName), int64(len(bucketPolicyStr)), bytes.NewReader([]byte(bucketPolicyStr))) if err != nil {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 32.9K bytes - Viewed (0) -
cmd/auth-handler_test.go
} } // Provides a fully populated http request instance, fails otherwise. func mustNewRequest(method string, urlStr string, contentLength int64, body io.ReadSeeker, t *testing.T) *http.Request { req, err := newTestRequest(method, urlStr, contentLength, body) if err != nil { t.Fatalf("Unable to initialize new http request %s", err) } return req } // This is similar to mustNewRequest but additionally the request
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Apr 09 14:28:39 UTC 2025 - 15.4K bytes - Viewed (0) -
cmd/signature-v4-utils_test.go
t.Fatalf("unable initialize config file, %s", err) } initAllSubsystems(ctx) initConfigSubsystem(ctx, objLayer) globalIAMSys.Init(ctx, objLayer, globalEtcdClient, 2*time.Second) req, err := newTestRequest(http.MethodGet, "http://example.com:9000/bucket/object", 0, nil) if err != nil { t.Fatal(err) } if err = signRequestV4(req, globalActiveCred.AccessKey, globalActiveCred.SecretKey); err != nil { t.Fatal(err)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Apr 09 14:28:39 UTC 2025 - 14.3K bytes - Viewed (0) -
cmd/object-handlers_test.go
} } // Test for Anonymous/unsigned http request. anonReq, err := newTestRequest(http.MethodHead, getHeadObjectURL("", bucketName, objectName), 0, nil) if err != nil { t.Fatalf("MinIO %s: Failed to create an anonymous request for %s/%s: <ERROR> %v", instanceType, bucketName, objectName, err) }
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 163.1K bytes - Viewed (0) -
cmd/test-utils_test.go
func getMD5HashBase64(data []byte) string { return base64.StdEncoding.EncodeToString(getMD5Sum(data)) } // Returns new HTTP request object. func newTestRequest(method, urlStr string, contentLength int64, body io.ReadSeeker) (*http.Request, error) { if method == "" { method = http.MethodPost } // Save for subsequent use var hashedPayload string
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 77K bytes - Viewed (0) -
cmd/server_test.go
// Unlike the actual PUT object request, the request to Copy Object doesn't contain request body, // empty body with the "X-Amz-Copy-Source" header pointing to the object to copies it in the backend. request, err = newTestRequest(http.MethodPut, getPutObjectURL(s.endPoint, bucketName, objectName2), 0, nil) c.Assert(err, nil) // setting the "X-Amz-Copy-Source" to allow copying the content of previously uploaded object.
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 118.1K bytes - Viewed (0)