Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for expectErr (0.08 sec)

  1. internal/event/config_test.go

    		err := ValidateFilterRuleValue(testCase.value)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    	}
    }
    
    func TestFilterRuleUnmarshalXML(t *testing.T) {
    	testCases := []struct {
    		data           []byte
    		expectedResult *FilterRule
    		expectErr      bool
    	}{
    		{[]byte(`<FilterRule></FilterRule>`), nil, true},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Dec 05 10:16:33 UTC 2023
    - 29K bytes
    - Viewed (0)
  2. cmd/storage-rest_test.go

    	testCases := []struct {
    		expectErr bool
    	}{
    		{true},
    	}
    
    	for i, testCase := range testCases {
    		_, err := storage.DiskInfo(context.Background(), DiskInfoOptions{Metrics: true})
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("case %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    		if err != errUnformattedDisk {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 22 07:04:48 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. internal/bucket/object/lock/lock_test.go

    		value       DefaultRetention
    		expectedErr error
    		expectErr   bool
    	}{
    		{
    			value:       DefaultRetention{Mode: "retain"},
    			expectedErr: fmt.Errorf("unknown retention mode retain"),
    			expectErr:   true,
    		},
    		{
    			value:       DefaultRetention{Mode: RetGovernance},
    			expectedErr: fmt.Errorf("either Days or Years must be specified"),
    			expectErr:   true,
    		},
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top