- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 413 for got4 (0.05 sec)
-
tests/hooks_test.go
t.Errorf("should got failed to save, but error is nil") } if DB.First(&Product4{}, "name = ?", product.Name).Error == nil { t.Errorf("should got RecordNotFound, but got nil") } product = Product4{Name: "Product-2", Price: 100, Item: ProductItem{Code: "valid"}} if err := DB.Create(&product).Error; err != nil { t.Errorf("should create product, but got error %v", err) }
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/serializer_test.go
t.Fatalf("no error should happen when migrate scanner, valuer struct, got error %v", err) } data := SerializerStruct{} if err := DB.Create(&data).Error; err != nil { t.Fatalf("failed to create data, got error %v", err) } var result SerializerStruct if err := DB.First(&result, data.ID).Error; err != nil { t.Fatalf("failed to query data, got error %v", err) } AssertEqual(t, result, data)
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Fri Apr 21 14:09:38 UTC 2023 - 7.6K bytes - Viewed (0) -
tests/error_translator_test.go
if !errors.Is(err, untranslatedErr) { t.Fatalf("expected err: %v got err: %v", untranslatedErr, err) } // it should translate error when the TranslateError flag is true db, _ = gorm.Open(tests.DummyDialector{TranslatedErr: translatedErr}, &gorm.Config{TranslateError: true}) err = db.AddError(untranslatedErr) if !errors.Is(err, translatedErr) { t.Fatalf("expected err: %v got err: %v", translatedErr, err) } }
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Wed Jul 12 13:21:22 UTC 2023 - 3.1K bytes - Viewed (0) -
internal/bucket/lifecycle/filter_test.go
objSize: 100*humanize.MiByte + 1, want: false, }, } for i, test := range tests { t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) { if got := test.filter.BySize(test.objSize); got != test.want { t.Fatalf("Expected %v but got %v", test.want, got) } }) } } func TestTestTags(t *testing.T) { noTags := Filter{ set: true, And: And{ Tags: []Tag{}, },
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Tue Feb 27 00:01:20 UTC 2024 - 7.2K bytes - Viewed (0) -
tests/create_test.go
t.Errorf("no error should happen when auto migrate, but got %v", err) } if err := DB.Create(&EmptyStruct{}).Error; err != nil { t.Errorf("No error should happen when creating user, but got %v", err) } } func TestCreateEmptySlice(t *testing.T) { data := []User{} if err := DB.Create(&data).Error; err != gorm.ErrEmptySlice { t.Errorf("no data should be created, got %v", err) }
Registered: Sun Oct 27 09:35:08 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } func TestWriteAppend(t *testing.T) { var got Buffer var want []byte for i := 0; i < 1000; i++ { b := got.AvailableBuffer() b = strconv.AppendInt(b, int64(i), 10) want = strconv.AppendInt(want, int64(i), 10) got.Write(b) } if !Equal(got.Bytes(), want) { t.Fatalf("Bytes() = %q, want %q", got, want) }
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
cmd/admin-handlers_test.go
// } // } check := func(exp, got madmin.LockEntries) (int, bool) { if len(exp) != len(got) { return 0, false } sort.Slice(exp, byResourceUID{exp}.Less) sort.Slice(got, byResourceUID{got}.Less) // printEntries(exp) // printEntries(got) for i, e := range exp { if !e.Timestamp.Equal(got[i].Timestamp) { return i, false }
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 13.9K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache_test.go
if err != nil { t.Fatalf("unexpected error: %v", err) } if !reflect.DeepEqual(netns1, netns2) { t.Fatalf("Expected the same Netns for the same uid, got %v and %v", netns1, netns2) } if counter.Load() != 2 { t.Fatalf("Expected openNetns to be called twice, got %d", counter.Load()) } } func TestUpsertPodCacheWithNewInode(t *testing.T) { counter.Store(0)
Registered: Wed Oct 30 22:53:10 UTC 2024 - Last Modified: Wed Aug 14 19:36:19 UTC 2024 - 4.2K bytes - Viewed (0) -
cmd/sftp-server_test.go
if err == nil || !errors.Is(err, errAuthentication) { c.Fatalf("expected err(%s) but got (%s)", errAuthentication, err) } newSSHCon = newSSHConnMock("dillon") _, err = sshPubKeyAuth(newSSHCon, testKey) if err == nil || !errors.Is(err, errNoSuchUser) { c.Fatalf("expected err(%s) but got (%s)", errNoSuchUser, err) } } func (s *TestSuiteIAM) SFTPPublicKeyAuthentication(c *check) {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Jun 28 09:06:25 UTC 2024 - 8.3K bytes - Viewed (0) -
src/bufio/scan_test.go
break } runeCount++ got, _ := utf8.DecodeRune(s.Bytes()) if got != expect { t.Errorf("#%d: %d: expected %q got %q", n, i, expect, got) } } if s.Scan() { t.Errorf("#%d: scan ran too long, got %q", n, s.Text()) } testRuneCount := utf8.RuneCountInString(test) if runeCount != testRuneCount { t.Errorf("#%d: termination expected at %d; got %d", n, testRuneCount, runeCount) }
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0)