Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,048 for testcase (0.23 sec)

  1. internal/config/etcd/etcd_test.go

    		{"http://localhost:2379", []string{"http://localhost:2379"}, false, true},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.s, func(t *testing.T) {
    			endpoints, secure, err := parseEndpoints(testCase.s)
    			if err != nil && testCase.success {
    				t.Errorf("expected to succeed but failed with %s", err)
    			}
    			if !testCase.success && err == nil {
    				t.Error("expected failure but succeeded instead")
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  2. internal/config/lambda/event/targetid_test.go

    	for i, testCase := range testCases {
    		targetID := &TargetID{}
    		err := targetID.UnmarshalJSON(testCase.data)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if *targetID != *testCase.expectedTargetID {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  3. cmd/signature-v2_test.go

    		},
    	}
    
    	for i, testCase := range testCases {
    		t.Run(fmt.Sprintf("Case %d AuthStr \"%s\".", i+1, testCase.authString), func(t *testing.T) {
    			req := &http.Request{
    				Header: make(http.Header),
    				URL:    &url.URL{},
    			}
    			req.Header.Set("Authorization", testCase.authString)
    			_, actualErrCode := validateV2AuthHeader(req)
    
    			if testCase.expectedError != actualErrCode {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Oct 14 10:08:40 GMT 2022
    - 8K bytes
    - Viewed (0)
  4. internal/config/compress/compress_test.go

    		{"text/*,application/json", []string{"text/*", "application/json"}, true},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.str, func(t *testing.T) {
    			gotPatterns, err := parseCompressIncludes(testCase.str)
    			if !testCase.success && err == nil {
    				t.Error("expected failure but success instead")
    			}
    			if testCase.success && err != nil {
    				t.Errorf("expected success but failed instead %s", err)
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
  5. cmd/update_test.go

    		},
    	}
    	for i, testCase := range testCases {
    		if testCase.errStr != "" {
    			got := releaseTimeToReleaseTag(testCase.t)
    			if got != testCase.tag && testCase.errStr == "" {
    				t.Errorf("Test %d: Expected %v but got %v", i+1, testCase.tag, got)
    			}
    		}
    		tagTime, err := releaseTagToReleaseTime(testCase.tag)
    		if err != nil && err.Error() != testCase.errStr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle-handlers_test.go

    	},
    ) {
    	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),
    			int64(len(testCase.body)), bytes.NewReader(testCase.body), testCase.accessKey, testCase.secretKey, nil)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 13 20:52:33 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  7. cmd/bucket-policy-handlers_test.go

    		},
    	}
    	// Iterating over the cases, fetching the policy and validating the response.
    	for i, testCase := range testCases {
    		// expected bucket policy json string.
    		expectedBucketPolicyStr := fmt.Sprintf(testCase.expectedBucketPolicy, testCase.bucketName, testCase.bucketName)
    		// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    		recV4 := httptest.NewRecorder()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  8. cmd/signature-v4-utils_test.go

    			if testCase.inputHeaderKey != "" {
    				q.Add(testCase.inputHeaderKey, testCase.inputHeaderValue)
    			}
    			inputReq.URL.RawQuery = q.Encode()
    		} else if testCase.inputHeaderKey != "" {
    			inputReq.Header.Set(testCase.inputHeaderKey, testCase.inputHeaderValue)
    		}
    		inputReq.ParseForm()
    
    		actualResult := skipContentSha256Cksum(inputReq)
    		if testCase.expectedResult != actualResult {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-decom_test.go

    		},
    	}
    
    	t.Parallel()
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.name, func(t *testing.T) {
    			update, err := testCase.meta.validate(testCase.pools)
    			if testCase.expectedErr {
    				t.Log(err)
    			}
    			if err != nil && !testCase.expectedErr {
    				t.Errorf("Expected success, but found %s", err)
    			}
    			if err == nil && testCase.expectedErr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 03 16:47:40 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  10. cmd/xl-storage_unix_test.go

    	}
    	testCase := testCases[0]
    
    	// Initialize a new xlStorage layer.
    	disk, err := newLocalXLStorage(tmpPath)
    	if err != nil {
    		t.Fatalf("Initializing xlStorage failed with %s.", err)
    	}
    
    	// Attempt to create a volume to verify the permissions later.
    	// MakeVol creates directory with 0777 perms.
    	if err = disk.MakeVol(context.Background(), testCase.volName); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 3.4K bytes
    - Viewed (0)
Back to top