Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 176 for testCases (0.09 sec)

  1. internal/store/store_test.go

    			},
    			expectedString: "01894394-d046-4783-ba0d-f1c6885790dc.event",
    		},
    	}
    
    	for i, testCase := range testCases {
    		if testCase.expectedString != testCase.key.String() {
    			t.Fatalf("case[%v]: key.String() Expected: %s, got %s", i, testCase.expectedString, testCase.key.String())
    		}
    	}
    }
    
    func TestParseKey(t *testing.T) {
    	testCases := []struct {
    		str         string
    		expectedKey Key
    	}{
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. cmd/policy_test.go

    		{yourbucketAnonGetObjectActionArgs, false},
    		{yourbucketGetObjectActionArgs, true},
    	}
    
    	for i, testCase := range testCases {
    		result := p.IsAllowed(testCase.args)
    
    		if result != testCase.expectedResult {
    			t.Fatalf("case %v: expected: %v, got: %v\n", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    func getReadOnlyStatement(bucketName, prefix string) []miniogopolicy.Statement {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. cmd/admin-handlers-users-race_test.go

    		// Init and run test on ErasureSet backend.
    		{serverType: "ErasureSet", signer: signerV4},
    	}
    	testCases := []*TestSuiteIAM{}
    	for _, bt := range baseTestCases {
    		testCases = append(testCases,
    			newTestSuiteIAM(bt, false),
    			newTestSuiteIAM(bt, true),
    		)
    	}
    	for i, testCase := range testCases {
    		etcdStr := ""
    		if testCase.withEtcdBackend {
    			etcdStr = " (with etcd backend)"
    		}
    		t.Run(
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 09:06:25 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. cmd/object-handlers-common_test.go

    	"bytes"
    	"context"
    	"net/http"
    	"net/http/httptest"
    	"testing"
    	"time"
    
    	xhttp "github.com/minio/minio/internal/http"
    )
    
    // Tests - canonicalizeETag()
    func TestCanonicalizeETag(t *testing.T) {
    	testCases := []struct {
    		etag              string
    		canonicalizedETag string
    	}{
    		{
    			etag:              "\"\"\"",
    			canonicalizedETag: "",
    		},
    		{
    			etag:              "\"\"\"abc\"",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. cmd/object-api-options_test.go

    			},
    		},
    	}
    
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			rec := httptest.NewRecorder()
    			req := httptest.NewRequest("GET", "/test", nil)
    			req.Header = testCase.headers
    
    			opts, _ := getAndValidateAttributesOpts(ctx, rec, req, bucket, "testobject")
    
    			if !reflect.DeepEqual(opts.ObjectAttributes, testCase.wantObjectAttrs) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 21:13:59 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 01 14:38:46 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  9. cmd/object-api-deleteobject_test.go

    			[]string{"object0"},
    		},
    	}
    
    	for i, testCase := range testCases {
    		err := obj.MakeBucket(context.Background(), testCase.bucketName, MakeBucketOptions{})
    		if err != nil {
    			t.Fatalf("%s : %s", instanceType, err.Error())
    		}
    
    		for _, object := range testCase.objectToUploads {
    			md5Bytes := md5.Sum([]byte(object.content))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 29 01:40:52 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. internal/http/server_test.go

    		{[]string{"127.0.0.1:9000", nonLoopBackIP + ":9000"}, handler, getCert},
    	}
    
    	for i, testCase := range testCases {
    		server := NewServer(testCase.addrs).
    			UseHandler(testCase.handler)
    		if testCase.certFn != nil {
    			server = server.UseTLSConfig(&tls.Config{
    				PreferServerCipherSuites: true,
    				GetCertificate:           testCase.certFn,
    			})
    		}
    		if server == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 19 18:42:47 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top