Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NewRecorder (0.08 sec)

  1. cmd/bucket-handlers_test.go

    		t.Fatalf("Test %v: expected failure, but succeeded with %v", instanceType, rec.Code)
    	}
    
    	// Verify response of the V2 signed HTTP request.
    	// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    	recV2 := httptest.NewRecorder()
    	// construct HTTP request for DELETE bucket.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  2. cmd/bucket-policy-handlers_test.go

    	for i, testCase := range testCases {
    		// obtain the put bucket policy request body.
    		// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    		recV4 := httptest.NewRecorder()
    		// construct HTTP request for PUT bucket policy endpoint.
    		reqV4, err := newTestSignedRequestV4(http.MethodPut, getPutPolicyURL("", testCase.bucketName),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  3. cmd/post-policy_test.go

    	if !globalBrowserEnabled {
    		globalBrowserEnabled = true
    		defer func() { globalBrowserEnabled = false }()
    	}
    
    	// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    	rec := httptest.NewRecorder()
    	req, perr := newPostRequestV4("", bucketName, objectName, []byte("pwned"), credentials.AccessKey, credentials.SecretKey)
    	if perr != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  4. cmd/admin-handlers_test.go

    		}()
    	}
    	credentials := globalActiveCred
    
    	req, err := getServiceCmdRequest(cmd, credentials)
    	if err != nil {
    		t.Fatalf("Failed to build service status request %v", err)
    	}
    
    	rec := httptest.NewRecorder()
    	adminTestBed.router.ServeHTTP(rec, req)
    
    	resp, _ := io.ReadAll(rec.Body)
    	if rec.Code != http.StatusOK {
    		t.Errorf("Expected to receive %d status code but received %d. Body (%s)",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  5. cmd/kms-handlers_test.go

    		accessKey = userAccessKey
    		secretKey = userSecretKey
    	}
    
    	req := buildKMSRequest(t, test.method, test.path, accessKey, secretKey, test.query)
    	rec := httptest.NewRecorder()
    	adminTestBed.router.ServeHTTP(rec, req)
    
    	t.Logf("HTTP req: %s, resp code: %d, resp body: %s", req.URL.String(), rec.Code, rec.Body.String())
    
    	// Check status code
    	if rec.Code != test.wantStatusCode {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle-handlers_test.go

    		shouldPass         bool
    	},
    ) {
    	for i, testCase := range testCases {
    		// initialize httptest Recorder, this records any mutations to response writer inside the handler.
    		rec := httptest.NewRecorder()
    		// construct HTTP request
    		req, err := newTestSignedRequestV4(testCase.method, getBucketLifecycleURL("", testCase.bucketName),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  7. cmd/object-api-utils_test.go

    		t.Fatalf("Initializing config.json failed")
    	}
    
    	objectName := `\../.minio.sys/config/hello.txt`
    
    	// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    	rec := httptest.NewRecorder()
    	// construct HTTP request for Get Object end point.
    	req, err := newTestSignedRequestV4(http.MethodPut, getPutObjectURL("", bucketName, objectName),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
Back to top