Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,048 for testcase (0.21 sec)

  1. cmd/handler-utils_test.go

    		{malformedReq, globalMinioDefaultRegion, ErrMalformedXML},
    	}
    
    	for i, testCase := range testCases {
    		config.SetRegion(globalServerConfig, testCase.serverConfigRegion)
    		_, actualCode := parseLocationConstraint(testCase.request)
    		if testCase.expectedCode != actualCode {
    			t.Errorf("Test %d: Expected the APIErrCode to be %d, but instead found %d", i+1, testCase.expectedCode, actualCode)
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  2. cmd/api-resources_test.go

    		}
    		if startAfter != testCase.startAfter {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.startAfter, startAfter)
    		}
    		if delimiter != testCase.delimiter {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, testCase.delimiter, delimiter)
    		}
    		if fetchOwner != testCase.fetchOwner {
    			t.Errorf("Test %d: Expected %t, got %t", i+1, testCase.fetchOwner, fetchOwner)
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  3. internal/disk/stat_test.go

    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			tmpfile, err := os.CreateTemp("", "testfile")
    			if err != nil {
    				t.Error(err)
    			}
    			tmpfile.WriteString(testCase.stat)
    			tmpfile.Sync()
    			tmpfile.Close()
    
    			iostats, err := readDriveStats(tmpfile.Name())
    			if err != nil && !testCase.expectErr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. cmd/auth-handler_test.go

    	}
    
    	// Validates all testcases.
    	for i, testCase := range testCases {
    		s3Error := isReqAuthenticated(ctx, testCase.req, globalSite.Region, serviceS3)
    		if s3Error != testCase.s3Error {
    			if _, err := io.ReadAll(testCase.req.Body); toAPIErrorCode(ctx, err) != testCase.s3Error {
    				t.Fatalf("Test %d: Unexpected S3 error: want %d - got %d (got after reading request %s)", i, testCase.s3Error, s3Error, toAPIError(ctx, err).Code)
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  5. internal/http/server_test.go

    	}
    
    	for i, testCase := range testCases {
    		server := NewServer(testCase.addrs).
    			UseHandler(testCase.handler).
    			UseShutdownTimeout(DefaultShutdownTimeout)
    		if testCase.certFn != nil {
    			server = server.UseTLSConfig(&tls.Config{
    				PreferServerCipherSuites: true,
    				GetCertificate:           testCase.certFn,
    			})
    		}
    		if server == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  6. cmd/policy_test.go

    		if expectErr != testCase.expectErr {
    			t.Fatalf("case %v: error: expected: %v, got: %v\n", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if !reflect.DeepEqual(result, testCase.expectedResult) {
    				t.Fatalf("case %v: result: expected: %+v, got: %+v\n", i+1, testCase.expectedResult, result)
    			}
    		}
    	}
    }
    
    func TestBucketAccessPolicyToPolicy(t *testing.T) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  7. internal/config/identity/openid/jwt_test.go

    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			claims := map[string]interface{}{}
    			claims["exp"] = testCase.exp
    			err := updateClaimsExpiry(testCase.dsecs, claims)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success, got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  8. cmd/erasure-sets_test.go

    		{512},
    		{1024},
    	}
    	for _, testCase := range cases {
    		testCase := testCase
    		key := randString(testCase.key)
    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				sipHashMod(key, 16, testUUID)
    			}
    		})
    	}
    }
    
    // TestSipHashMod - test sip hash.
    func TestSipHashMod(t *testing.T) {
    	testCases := []struct {
    		objectName string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 12 07:21:56 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  9. internal/http/listener_test.go

    	}
    
    	for testIdx, testCase := range testCases {
    		listener, listenErrs := newHTTPListener(context.Background(),
    			testCase.serverAddrs,
    			TCPOptions{},
    		)
    		for i, expectedListenErr := range testCase.expectedListenErrs {
    			if !expectedListenErr {
    				if listenErrs[i] != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 12 16:09:28 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. cmd/endpoint-ellipses_test.go

    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			gotGCD := getDivisibleSize(testCase.totalSizes)
    			if testCase.result != gotGCD {
    				t.Errorf("Expected %v, got %v", testCase.result, gotGCD)
    			}
    		})
    	}
    }
    
    // Test tests calculating set indexes with ENV override for drive count.
    func TestGetSetIndexesEnvOverride(t *testing.T) {
    	testCases := []struct {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Dec 07 09:33:56 GMT 2023
    - 15.2K bytes
    - Viewed (0)
Back to top