Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 918 for but (0.24 sec)

  1. internal/store/batch_test.go

    	}
    	err := batch.Add(101, 101)
    	if err == nil || !errors.Is(err, ErrBatchFull) {
    		t.Fatalf("Expected err %v but got %v", ErrBatchFull, err)
    	}
    	if !batch.IsFull() {
    		t.Fatal("Expected batch.IsFull to be true but got false")
    	}
    	batchLen := batch.Len()
    	if batchLen != int(limit) {
    		t.Fatalf("expected batch length to be %v but got %v", limit, batchLen)
    	}
    	keys, items, err := batch.GetAll()
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  2. tests/query_test.go

    	if err := DB.Where(&user).First(&User{}).Error; err != nil {
    		t.Errorf("search with struct with association should returns no error, but got %v", err)
    	}
    
    	if err := DB.Where(user).First(&User{}).Error; err != nil {
    		t.Errorf("search with struct with association should returns no error, but got %v", err)
    	}
    }
    
    func TestFindInBatches(t *testing.T) {
    	users := []User{
    		*GetUser("find_in_batches", Config{}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  3. internal/config/compress/compress_test.go

    			if !testCase.success && err == nil {
    				t.Error("expected failure but success instead")
    			}
    			if testCase.success && err != nil {
    				t.Errorf("expected success but failed instead %s", err)
    			}
    			if testCase.success && !reflect.DeepEqual(testCase.expectedPatterns, gotPatterns) {
    				t.Errorf("expected patterns %s but got %s", testCase.expectedPatterns, gotPatterns)
    			}
    		})
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.8K bytes
    - Viewed (0)
  4. tests/non_std_test.go

    		t.Errorf("Name fields shouldn't be changed if untouched, but got %v", animal.Name)
    	}
    
    	// When changing a field with a default value, the change must occur
    	animal.Name = "amazing horse"
    	DB.Save(&animal)
    	DB.First(&animal, animal.Counter)
    	if animal.Name != "amazing horse" {
    		t.Errorf("Update a filed with a default value should occur. But got %v\n", animal.Name)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  5. istioctl/cmd/istioctl_test.go

    		// do nothing
    	default:
    		t.Errorf("Expected a CommandParseError, but got %q.", fErr)
    	}
    
    	// we should propagate to subcommands
    	rootCmd = GetRootCmd([]string{"analyze", "--unknown-flag"})
    	fErr = rootCmd.Execute()
    
    	switch fErr.(type) {
    	case istioctlutil.CommandParseError:
    		// do nothing
    	default:
    		t.Errorf("Expected a CommandParseError, but got %q.", fErr)
    	}
    
    	// all of the subcommands
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Aug 29 14:53:25 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  6. cmd/admin-handlers_test.go

    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU Affero General Public License for more details.
    //
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  7. tests/associations_many2many_test.go

    	}
    
    	if err := DB.Create(&user.Languages).Error; err != nil {
    		t.Fatalf("no error should happen when create languages, but got %v", err)
    	}
    
    	if err := DB.Omit("Languages.*").Create(&user).Error; err != nil {
    		t.Fatalf("no error should happen when create user when languages exists, but got %v", err)
    	}
    
    	// Find
    	var languages []Language
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
  8. internal/config/etcd/etcd_test.go

    		t.Run(testCase.s, func(t *testing.T) {
    			endpoints, secure, err := parseEndpoints(testCase.s)
    			if err != nil && testCase.success {
    				t.Errorf("expected to succeed but failed with %s", err)
    			}
    			if !testCase.success && err == nil {
    				t.Error("expected failure but succeeded instead")
    			}
    			if testCase.success {
    				if !reflect.DeepEqual(endpoints, testCase.endpoints) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  9. internal/disk/stat_test.go

    			if err != nil && !testCase.expectErr {
    				t.Fatalf("unexpected err; %v", err)
    			}
    			if testCase.expectErr && err == nil {
    				t.Fatal("expected to fail but err is nil")
    			}
    			if !reflect.DeepEqual(iostats, testCase.expectedIOStats) {
    				t.Fatalf("expected iostats: %v but got %v", testCase.expectedIOStats, iostats)
    			}
    		})
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  10. clause/expression_test.go

    			if stmt.SQL.String() != result.Result {
    				t.Errorf("generated SQL is not equal, expects %v, but got %v", result.Result, stmt.SQL.String())
    			}
    
    			if !reflect.DeepEqual(result.ExpectedVars, stmt.Vars) {
    				t.Errorf("generated vars is not equal, expects %v, but got %v", result.ExpectedVars, stmt.Vars)
    			}
    		})
    	}
    }
    
    func TestExpression(t *testing.T) {
    	column := "column-name"
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Aug 10 05:34:33 GMT 2023
    - 8.4K bytes
    - Viewed (0)
Back to top