- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 63 for SetUser (0.06 sec)
-
cmd/sts-handlers_test.go
`, bucket, bucket)) err = s.adm.AddCannedPolicy(ctx, policy, policyBytes) if err != nil { c.Fatalf("policy add error: %v", err) } accessKey, secretKey := mustGenerateCredentials(c) err = s.adm.SetUser(ctx, accessKey, secretKey, madmin.AccountEnabled) if err != nil { c.Fatalf("Unable to set user: %v", err) } _, err = s.adm.AttachPolicy(ctx, madmin.PolicyAssociationReq{ Policies: []string{policy},
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 97.1K bytes - Viewed (0) -
tests/create_test.go
*GetUser("bulk_4", Config{Account: true, Pets: 3, Toys: 0, Company: false, Manager: true, Team: 0, Languages: 3, Friends: 0}), *GetUser("bulk_5", Config{Account: false, Pets: 0, Toys: 3, Company: true, Manager: false, Team: 1, Languages: 3, Friends: 1}), *GetUser("bulk_6", Config{Account: true, Pets: 4, Toys: 3, Company: false, Manager: true, Team: 1, Languages: 3, Friends: 0}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
tests/benchmark_test.go
func BenchmarkCreate(b *testing.B) { user := *GetUser("bench", Config{}) for x := 0; x < b.N; x++ { user.ID = 0 DB.Create(&user) } } func BenchmarkFind(b *testing.B) { user := *GetUser("find", Config{}) DB.Create(&user) for x := 0; x < b.N; x++ { DB.Find(&User{}, "id = ?", user.ID) } } func BenchmarkScan(b *testing.B) { user := *GetUser("scan", Config{}) DB.Create(&user)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 01 03:50:57 UTC 2022 - 1.5K bytes - Viewed (0) -
tests/associations_many2many_test.go
} // Append teams1 := []User{*GetUser("friend-append-1", Config{})} teams2 := []User{} teams3 := []*User{GetUser("friend-append-3-1", Config{}), GetUser("friend-append-3-2", Config{})} DB.Model(&users).Association("Team").Append(&teams1, &teams2, &teams3) AssertAssociationCount(t, users, "Team", 9, "After Append")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/transaction_test.go
t.Fatalf("Should find saved record") } } func TestNestedTransactionWithBlock(t *testing.T) { var ( user = *GetUser("transaction-nested", Config{}) user1 = *GetUser("transaction-nested-1", Config{}) user2 = *GetUser("transaction-nested-2", Config{}) ) if err := DB.Transaction(func(tx *gorm.DB) error { tx.Create(&user)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0) -
tests/preload_test.go
DB.Preload("Pets.Toy").Find(&user4, "id = ?", user.ID) CheckUser(t, *user4, user) } func TestNestedPreloadForSlice(t *testing.T) { users := []User{ *GetUser("slice_nested_preload_1", Config{Pets: 2}), *GetUser("slice_nested_preload_2", Config{Pets: 0}), *GetUser("slice_nested_preload_3", Config{Pets: 3}), } for _, user := range users { for idx, pet := range user.Pets {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
tests/delete_test.go
package tests_test import ( "errors" "testing" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestDelete(t *testing.T) { users := []User{*GetUser("delete", Config{}), *GetUser("delete", Config{}), *GetUser("delete", Config{})} if err := DB.Create(&users).Error; err != nil { t.Errorf("errors happened when create: %v", err) } for _, user := range users { if user.ID == 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
tests/joins_test.go
} CheckUser(t, user2, user) } func TestJoinsForSlice(t *testing.T) { users := []User{ *GetUser("slice-joins-1", Config{Company: true, Manager: true, Account: true}), *GetUser("slice-joins-2", Config{Company: true, Manager: true, Account: true}), *GetUser("slice-joins-3", Config{Company: true, Manager: true, Account: true}), } DB.Create(&users) var userIDs []uint
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
tests/distinct_test.go
import ( "regexp" "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestDistinct(t *testing.T) { users := []User{ *GetUser("distinct", Config{}), *GetUser("distinct", Config{}), *GetUser("distinct", Config{}), *GetUser("distinct-2", Config{}), *GetUser("distinct-3", Config{}), } users[0].Age = 20 if err := DB.Create(&users).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2.5K bytes - Viewed (0) -
tests/update_test.go
"time" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/utils" . "gorm.io/gorm/utils/tests" ) func TestUpdate(t *testing.T) { var ( users = []*User{ GetUser("update-1", Config{}), GetUser("update-2", Config{}), GetUser("update-3", Config{}), } user = users[1] lastUpdatedAt time.Time ) checkUpdatedAtChanged := func(name string, n time.Time) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0)