Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,048 for testcase (0.18 sec)

  1. internal/config/lambda/event/targetidset_test.go

    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Union(testCase.setToAdd)
    
    		if !reflect.DeepEqual(testCase.expectedResult, result) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    func TestTargetIDSetDifference(t *testing.T) {
    	testCases := []struct {
    		set            TargetIDSet
    		setToRemove    TargetIDSet
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. internal/event/targetidset_test.go

    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Union(testCase.setToAdd)
    
    		if !reflect.DeepEqual(testCase.expectedResult, result) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    func TestTargetIDSetDifference(t *testing.T) {
    	testCases := []struct {
    		set            TargetIDSet
    		setToRemove    TargetIDSet
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  3. cmd/object-api-getobjectinfo_test.go

    		if err == nil && testCase.shouldPass {
    			if testCase.result.Bucket != result.Bucket {
    				t.Fatalf("Test %d: %s: Expected Bucket name to be '%s', but found '%s' instead", i+1, instanceType, testCase.result.Bucket, result.Bucket)
    			}
    			if testCase.result.Name != result.Name {
    				t.Errorf("Test %d: %s: Expected Object name to be %s, but instead found it to be %s", i+1, instanceType, testCase.result.Name, result.Name)
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  4. cmd/net_test.go

    		{"http://8.8.8.8:9000", "http://localhost:9000", false, nil},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			sameAddr, err := sameLocalAddrs(testCase.addr1, testCase.addr2)
    			if testCase.expectedErr != nil && err == nil {
    				t.Errorf("should fail but succeeded")
    			}
    			if testCase.expectedErr == nil && err != nil {
    				t.Errorf("should succeed but failed with %v", err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 08:43:09 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. internal/event/name_test.go

    	}
    
    	for i, testCase := range testCases {
    		data, err := json.Marshal(testCase.name)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if !reflect.DeepEqual(data, testCase.expectedData) {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, string(testCase.expectedData), string(data))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  6. 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))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  7. cmd/storage-rest_test.go

    	}
    
    	result := make([]byte, 100)
    	for i, testCase := range testCases {
    		result = result[testCase.offset:3]
    		_, err := storage.ReadFile(context.Background(), testCase.volumeName, testCase.objectName, testCase.offset, result, nil)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("case %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  8. internal/amztime/parse_test.go

    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.timeStr, func(t *testing.T) {
    			gott, goterr := Parse(testCase.timeStr)
    			if !errors.Is(goterr, testCase.expectedErr) {
    				t.Errorf("expected %v, got %v", testCase.expectedErr, goterr)
    			}
    			if !gott.Equal(testCase.expectedTime) {
    				t.Errorf("expected %v, got %v", testCase.expectedTime, gott)
    			}
    		})
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Sep 07 14:24:54 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  9. cmd/utils_test.go

    		},
    	}
    
    	// Validate all test cases.
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			bucketName, objectName := path2BucketObject(testCase.path)
    			if bucketName != testCase.bucket {
    				t.Errorf("failed expected bucket name \"%s\", got \"%s\"", testCase.bucket, bucketName)
    			}
    			if objectName != testCase.object {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  10. internal/auth/credentials_test.go

    		{1574812326.000, false},
    		{time.Duration(3) * time.Minute, false},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			_, err := ExpToInt64(testCase.exp)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success but got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    				t.Error("Expected failure but got success")
    			}
    		})
    	}
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top