- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 683 for testCases (0.11 sec)
-
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)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 19 08:43:09 UTC 2024 - 9.3K bytes - Viewed (0) -
pkg/apis/core/helper/helpers_test.go
result: false, }, } for _, testCase := range testCases { if testCase.result != IsHugePageResourceValueDivisible(testCase.name, testCase.quantity) { t.Errorf("resource: %v storage:%v expected result: %v", testCase.name, testCase.quantity, testCase.result) } } } func TestHugePageResourceName(t *testing.T) { testCases := []struct { pageSize resource.Quantity
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 28 07:31:28 UTC 2023 - 9.2K bytes - Viewed (0) -
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))
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 01 01:11:10 UTC 2024 - 7.4K bytes - Viewed (0) -
pilot/pkg/security/authz/matcher/string_test.go
}, }, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { actual := StringMatcherWithPrefix(tc.v, tc.prefix) if !cmp.Equal(actual, tc.want, protocmp.Transform()) { t.Errorf("want %s but got %s", tc.want.String(), actual.String()) } }) } } func TestStringMatcherRegex(t *testing.T) { testCases := []testCase{ { name: "wildcardAsRequired", v: "*",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 17 22:42:11 UTC 2023 - 5.2K bytes - Viewed (0) -
internal/event/rules_test.go
{rulesCase8, NewPattern("", "*.jpg"), TargetID{"1", "webhook"}, 2}, } for i, testCase := range testCases { testCase.rules.Add(testCase.pattern, testCase.targetID) result := len(testCase.rules) if result != testCase.expectedResult { t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result) } } } func TestRulesMatch(t *testing.T) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 8.8K bytes - Viewed (0) -
internal/event/arn_test.go
for i, testCase := range testCases { data, err := xml.Marshal(testCase.arn) 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)) } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 3.8K bytes - Viewed (0) -
internal/event/rulesmap_test.go
{rulesMapCase4, ObjectCreatedPut, "2000/photo.png", NewTargetIDSet(TargetID{"2", "amqp"})}, } for i, testCase := range testCases { result := testCase.rulesMap.Match(testCase.eventName, testCase.objectName) if !reflect.DeepEqual(result, testCase.expectedResult) { t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result) } } } func TestNewRulesMap(t *testing.T) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jan 05 18:43:06 UTC 2024 - 6.8K bytes - Viewed (0) -
internal/event/targetid_test.go
for i, testCase := range testCases { targetID := &TargetID{} err := targetID.UnmarshalJSON(testCase.data) 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 *targetID != *testCase.expectedTargetID {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 3.5K bytes - Viewed (0) -
internal/config/lambda/event/targetid_test.go
for i, testCase := range testCases { targetID := &TargetID{} err := targetID.UnmarshalJSON(testCase.data) 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 *targetID != *testCase.expectedTargetID {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Mar 07 16:12:41 UTC 2023 - 3.5K bytes - Viewed (0) -
internal/config/bool-flag_test.go
func TestBoolFlagString(t *testing.T) { var bf BoolFlag testCases := []struct { flag BoolFlag expectedResult string }{ {bf, "off"}, {BoolFlag(true), "on"}, {BoolFlag(false), "off"}, } for _, testCase := range testCases { str := testCase.flag.String() if testCase.expectedResult != str { t.Fatalf("expected: %v, got: %v", testCase.expectedResult, str) } } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 3.5K bytes - Viewed (0)