Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 418 for fatalf (0.1 sec)

  1. tests/prepared_stmt_test.go

    		t.Fatalf("no error should happen but got %v", err)
    	}
    
    	time.Sleep(time.Second)
    
    	var result2 User
    	if err := tx.Find(&result2, user.ID).Error; err != nil {
    		t.Fatalf("no error should happen but got %v", err)
    	}
    
    	user2 := *GetUser("prepared_stmt2", Config{})
    	if err := txCtx.Create(&user2).Error; err == nil {
    		t.Fatalf("should failed to create with timeout context")
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. tests/associations_has_many_test.go

    		t.Fatalf("should only find no pet with invalid conditions, but got %v", count)
    	}
    
    	// Count
    	AssertAssociationCount(t, user, "Pets", 2, "")
    
    	// Append
    	pet := Pet{Name: "pet-has-many-append"}
    
    	if err := DB.Model(&user2).Association("Pets").Append(&pet); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	if pet.ID == 0 {
    		t.Fatalf("Pet's ID should be created")
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  3. cmd/os-readdir_test.go

    			if err != nil {
    				os.RemoveAll(dir)
    				t.Fatalf("Unable to create a file, %s", err)
    			}
    		}
    		entries, err := readDirN(dir, testCase.n)
    		if err != nil {
    			os.RemoveAll(dir)
    			t.Fatalf("Unable to read entries, %s", err)
    		}
    		if len(entries) != testCase.expectedNum {
    			os.RemoveAll(dir)
    			t.Fatalf("Test %d: unexpected number of entries, waiting for %d, but found %d",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 7.5K bytes
    - Viewed (0)
  4. cmd/xl-storage_unix_test.go

    	// Initialize a new xlStorage layer.
    	disk, err := newLocalXLStorage(tmpPath)
    	if err != nil {
    		t.Fatalf("Initializing xlStorage failed with %s.", err)
    	}
    
    	// Attempt to create a volume to verify the permissions later.
    	// MakeVol creates 0777.
    	if err = disk.MakeVol(context.Background(), testCase.volName); err != nil {
    		t.Fatalf("Creating a volume failed with %s expected to pass.", err)
    	}
    
    	// Stat to get permissions bits.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 25 19:37:26 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  5. istioctl/pkg/multicluster/remote_secret_test.go

    				if err == nil {
    					tt.Fatalf("wanted error including %q but none", c.wantErrStr)
    				} else if !strings.Contains(err.Error(), c.wantErrStr) {
    					tt.Fatalf("wanted error including %q but %v", c.wantErrStr, err)
    				}
    			} else if c.wantErrStr == "" && err != nil {
    				tt.Fatalf("wanted non-error but got %q", err)
    			} else if diff := cmp.Diff(got, c.want); diff != "" {
    				tt.Fatalf(" got %v\nwant %v\ndiff %v", got, c.want, diff)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 24 17:36:49 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  6. schema/schema_test.go

    	if err != nil {
    		t.Fatalf("failed to parse user, got error %v", err)
    	}
    
    	checkUserSchema(t, user)
    }
    
    func TestParseSchemaWithMap(t *testing.T) {
    	type User struct {
    		tests.User
    		Attrs map[string]string `gorm:"type:Map(String,String);"`
    	}
    
    	user, err := schema.Parse(&User{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    		t.Fatalf("failed to parse user with map, got error %v", err)
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jun 20 12:19:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. internal/s3select/sql/parser_test.go

    	// s := bytes.NewBuffer([]byte("COUNT(Id)"))
    	lex, err := sqlLexer.Lex(s)
    	if err != nil {
    		t.Fatal(err)
    	}
    	tokens, err := lexer.ConsumeAll(lex)
    	if err != nil {
    		t.Fatal(err)
    	}
    	// for i, t := range tokens {
    	// 	fmt.Printf("%d: %#v\n", i, t)
    	// }
    	if len(tokens) != 7 {
    		t.Fatalf("Expected 7 got %d", len(tokens))
    	}
    }
    
    func TestSelectWhere(t *testing.T) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  8. internal/etag/etag_test.go

    		etag, err := Parse(test.String)
    		if err == nil && test.ShouldFail {
    			t.Fatalf("Test %d: parse should have failed but succeeded", i)
    		}
    		if err != nil && !test.ShouldFail {
    			t.Fatalf("Test %d: failed to parse ETag %q: %v", i, test.String, err)
    		}
    		if !Equal(etag, test.ETag) {
    			t.Log([]byte(etag))
    			t.Fatalf("Test %d: ETags don't match", i)
    		}
    	}
    }
    
    var stringTests = []struct {
    	ETag   ETag
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  9. cmd/bucket-handlers_test.go

    	// if object upload fails stop the test.
    	if err != nil {
    		t.Fatalf("Error uploading object: <ERROR> %v", err)
    	}
    
    	// initialize httptest Recorder, this records any mutations to response writer inside the handler.
    	rec := httptest.NewRecorder()
    	// construct HTTP request for DELETE bucket.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  10. cmd/sts-handlers_test.go

    		c.Fatalf("Unable to set policy: %v", err)
    	}
    
    	value, err := ldapID.Retrieve()
    	if err != nil {
    		c.Fatalf("Expected to generate STS creds, got err: %#v", err)
    	}
    
    	usersList, err := s.adm.ListUsers(ctx)
    	if err != nil {
    		c.Fatalf("list users should not fail: %v", err)
    	}
    	if len(usersList) != 1 {
    		c.Fatalf("expected user listing output: %#v", usersList)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 97.1K bytes
    - Viewed (0)
Back to top