Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for shouldPass (0.19 sec)

  1. cmd/bucket-lifecycle-handlers_test.go

    		}
    		if testCase.shouldPass && !bytes.Equal(testCase.lifecycleResponse, rec.Body.Bytes()) {
    			t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.lifecycleResponse), rec.Body.String())
    		}
    		errorResponse := APIErrorResponse{}
    		err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse)
    		if err != nil && !testCase.shouldPass {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 13 20:52:33 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  2. cmd/bucket-encryption_test.go

    			</Rule>
    			</ServerSideEncryptionConfiguration>`,
    			expectedErr: nil,
    			shouldPass:  true,
    		},
    	}
    
    	for i, tc := range testCases {
    		_, err := validateBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML)))
    		if tc.shouldPass && err != nil {
    			t.Fatalf("Test case %d: Expected to succeed but got %s", i+1, err)
    		}
    
    		if !tc.shouldPass {
    			if err == nil || err != nil && err.Error() != tc.expectedErr.Error() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri May 14 07:59:05 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  3. cmd/object-api-getobjectinfo_test.go

    		result, err := obj.GetObjectInfo(context.Background(), testCase.bucketName, testCase.objectName, opts)
    		if err != nil && testCase.shouldPass {
    			t.Errorf("Test %d: %s: Expected to pass, but failed with: <ERROR> %s", i+1, instanceType, err.Error())
    		}
    		if err == nil && !testCase.shouldPass {
    			t.Errorf("Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, instanceType, testCase.err.Error())
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  4. internal/bucket/encryption/bucket-sse-config_test.go

    			expectedErr: errors.New("MasterKeyID contains unsupported characters"),
    			shouldPass:  false,
    		},
    	}
    
    	for i, tc := range testCases {
    		ssec, err := ParseBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML)))
    		if tc.shouldPass && err != nil {
    			t.Errorf("Test case %d: Expected to succeed but got %s", i+1, err)
    		}
    
    		if !tc.shouldPass {
    			if err == nil || err != nil && err.Error() != tc.expectedErr.Error() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 16 18:28:30 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  5. internal/crypto/key_test.go

    func recoverTest(i int, shouldPass bool, t *testing.T) {
    	if err := recover(); err == nil && !shouldPass {
    		t.Errorf("Test %d should fail but passed successfully", i)
    	} else if err != nil && shouldPass {
    		t.Errorf("Test %d should pass but failed: %v", i, err)
    	}
    }
    
    var generateKeyTests = []struct {
    	ExtKey     [32]byte
    	Random     io.Reader
    	ShouldPass bool
    }{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  6. cmd/utils_test.go

    	testCases := []struct {
    		urlStr     string
    		shouldPass bool
    	}{
    		{"", false},
    		{":", false},
    		{"http://localhost/", true},
    		{"http://127.0.0.1/", true},
    		{"proto://myhostname/path", true},
    	}
    
    	// Validates fetching local address.
    	for i, testCase := range testCases {
    		_, err := checkURL(testCase.urlStr)
    		if testCase.shouldPass && err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  7. cmd/object-api-multipart_test.go

    		{bucketName: bucket, objName: object, uploadID: uploadID, PartID: 2, inputReaderData: "efgh", inputMd5: "1f7690ebdd9b4caf8fab49ca1757bf27", inputSHA256: "e5e088a0b66163a0a26a5e053d2a4496dc16ab6e0e3dd1adf2d16aa84a078c9d", inputDataSize: int64(len("efgh")), shouldPass: true},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  8. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        shouldFail(new CannotCreateDefault());
      }
    
      private static void shouldPass(Object instance, Visibility visibility) {
        new NullPointerTester().testInstanceMethods(instance, visibility);
      }
    
      private static void shouldPass(Object instance) {
        shouldPass(instance, Visibility.PACKAGE);
        shouldPass(instance, Visibility.PROTECTED);
        shouldPass(instance, Visibility.PUBLIC);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  9. cmd/bucket-handlers_test.go

    		if !bytes.Equal(testCase.locationResponse, rec.Body.Bytes()) && testCase.shouldPass {
    			t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.locationResponse), rec.Body.String())
    		}
    		errorResponse := APIErrorResponse{}
    		err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse)
    		if err != nil && !testCase.shouldPass {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 39.5K bytes
    - Viewed (2)
  10. cmd/object-api-listobjects_test.go

    					testCase.prefix, testCase.marker, testCase.delimiter, testCase.maxKeys)
    			}
    			if err != nil && testCase.shouldPass {
    				t.Errorf("Test %d: %s:  Expected to pass, but failed with: <ERROR> %s", i+1, instanceType, err.Error())
    			}
    			if err == nil && !testCase.shouldPass {
    				t.Errorf("Test %d: %s: Expected to fail with <ERROR> \"%s\", but passed instead", i+1, instanceType, testCase.err.Error())
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 73.1K bytes
    - Viewed (0)
Back to top