Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. internal/disk/stat_test.go

    				WriteSectors: 157049224,
    				WriteTicks:   7469810,
    				CurrentIOs:   0,
    				TotalTicks:   7580552,
    				ReqTicks:     9869354,
    			},
    			expectErr: false,
    		},
    		{
    			stat:            "1432553   420084 66247626  2398227",
    			expectedIOStats: IOStats{},
    			expectErr:       true,
    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 3.5K 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)
  4. cmd/policy_test.go

    		expectedResult *miniogopolicy.BucketAccessPolicy
    		expectErr      bool
    	}{
    		{case1Policy, case1Result, false},
    		{case2Policy, case2Result, false},
    		{case3Policy, nil, true},
    	}
    
    	for i, testCase := range testCases {
    		result, err := PolicyToBucketAccessPolicy(testCase.bucketPolicy)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. internal/config/identity/openid/jwt_test.go

    		reqURL    string
    		duration  time.Duration
    		expectErr bool
    	}{
    		{
    			reqURL:   "http://127.0.0.1:8443/?Token=xxxxx",
    			duration: time.Duration(60) * time.Minute,
    		},
    		{
    			reqURL:    "http://127.0.0.1:8443/?DurationSeconds=9s",
    			expectErr: true,
    		},
    		{
    			reqURL:    "http://127.0.0.1:8443/?DurationSeconds=31536001",
    			expectErr: true,
    		},
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top