Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. cmd/object-handlers-common_test.go

    			objInfo:         objInfo,
    			expectedFlag:    true,
    			expectedCode:    304,
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			recorder := httptest.NewRecorder()
    			request := httptest.NewRequest(http.MethodHead, "/bucket/a", bytes.NewReader([]byte{}))
    			request.Header.Set(xhttp.IfNoneMatch, tc.ifNoneMatch)
    			request.Header.Set(xhttp.IfModifiedSince, tc.ifModifiedSince)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. cmd/object-handlers_test.go

    			var reqV4, reqV2 *http.Request
    			var recV4, recV2 *httptest.ResponseRecorder
    
    			// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    			recV4 = httptest.NewRecorder()
    			recV2 = httptest.NewRecorder()
    			// setting a non-existent uploadID.
    			// deliberately introducing the invalid value to be able to assert the response with the expected error response.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 20:10:44 UTC 2024
    - 163.2K bytes
    - Viewed (0)
  3. cmd/object-api-options_test.go

    				"test1": {}, "test2": {}, "test3": {}, "test4": {},
    			},
    		},
    	}
    
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			rec := httptest.NewRecorder()
    			req := httptest.NewRequest("GET", "/test", nil)
    			req.Header = testCase.headers
    
    			opts, _ := getAndValidateAttributesOpts(ctx, rec, req, bucket, "testobject")
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 21:13:59 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. 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)
  5. cmd/test-utils_test.go

    		return fmt.Sprintf("MinIO %s: %s fail for \"%s\": \n<Error> %s", instanceType, testType, testName, failMsg)
    	}
    
    	// httptest Recorder to capture all the response by the http handler.
    	rec := httptest.NewRecorder()
    	// reading the body to preserve it so that it can be used again for second attempt of sending unsigned HTTP request.
    	// If the body is read in the handler the same request cannot be made use of.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 77K bytes
    - Viewed (0)
  6. 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)
  7. cmd/object-handlers.go

    					})
    					writeResponse(w, serr.HTTPStatusCode(), encodedErrorResponse, mimeXML)
    				} else {
    					writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    				}
    				return
    			}
    			nr := httptest.NewRecorder()
    			rw := xhttp.NewResponseRecorder(nr)
    			rw.LogErrBody = true
    			rw.LogAllBody = true
    			rreq.SelectParameters.Evaluate(rw)
    			rreq.SelectParameters.Close()
    			return
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
Back to top