Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 461 for got (0.02 sec)

  1. cmd/metacache-stream_test.go

    		if gotObj.name != want {
    			t.Errorf("entry %d, want %q, got %q", i, want, gotObj.name)
    		}
    	}
    }
    
    func Test_metacacheReader_peek(t *testing.T) {
    	r := loadMetacacheSample(t)
    	defer r.Close()
    	for i, want := range loadMetacacheSampleNames {
    		got, err := r.peek()
    		if err == io.EOF {
    			break
    		}
    		if err != nil {
    			t.Fatal(err)
    		}
    		if got.name != want {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 15K bytes
    - Viewed (0)
  2. tests/sql_builder_test.go

    	row := DB.Table("users").Where("name = ?", user2.Name).Select("age").Row()
    
    	var age int64
    	if err := row.Scan(&age); err != nil {
    		t.Fatalf("Failed to scan age, got %v", err)
    	}
    
    	if age != 10 {
    		t.Errorf("Scan with Row, age expects: %v, got %v", user2.Age, age)
    	}
    
    	table := "gorm.users"
    	if DB.Dialector.Name() != "mysql" || isTiDB() {
    		table = "users" // other databases doesn't support select with `database.table`
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/table/writer_test.go

    	expected := "NAME  NAMESPACE      VERSION\n" +
    		"foo   \x1b[32mbar\x1b[0m            1.0\n" +
    		"baz   \x1b[32mqux\x1b[0m            2.0\n" +
    		"qux   \x1b[32mquux\x1b[0m           3\n"
    	if got.String() != expected {
    		t.Errorf("got %q, want %q", got.String(), expected)
    	}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Sat Oct 08 04:41:42 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  4. cmd/utils_test.go

    			bucketName, objectName := path2BucketObject(testCase.path)
    			if bucketName != testCase.bucket {
    				t.Errorf("failed expected bucket name \"%s\", got \"%s\"", testCase.bucket, bucketName)
    			}
    			if objectName != testCase.object {
    				t.Errorf("failed expected bucket name \"%s\", got \"%s\"", testCase.object, objectName)
    			}
    		})
    	}
    }
    
    // Add tests for starting and stopping different profilers.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Feb 23 21:28:14 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. 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 Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  6. istioctl/cmd/root_test.go

    	parent.SetArgs([]string{"child", "--help"})
    	if err := parent.Execute(); err != nil {
    		t.Fatal(err)
    	}
    	got := out.String()
    	out.Reset()
    	checkHelpForFlag(t, got, parentFlag0, true)
    	checkHelpForFlag(t, got, parentFlag1, true)
    	checkHelpForFlag(t, got, parentFlag2, true)
    	checkHelpForFlag(t, got, childFlag2, true)
    
    	// verify the hidden parent flag is not visible in help text
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jan 15 17:59:55 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  7. internal/store/store_test.go

    			t.Fatalf("case[%v]: Expected key.Name: %v, got %v", i, testCase.expectedKey.Name, key.Name)
    		}
    		if testCase.expectedKey.Compress != key.Compress {
    			t.Fatalf("case[%v]: Expected key.Compress: %v, got %v", i, testCase.expectedKey.Compress, key.Compress)
    		}
    		if testCase.expectedKey.Extension != key.Extension {
    			t.Fatalf("case[%v]: Expected key.Extension: %v, got %v", i, testCase.expectedKey.Extension, key.Extension)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. cmd/os-readdir_test.go

    // checkResult - checks whether entries are got are same as expected entries.
    func checkResult(expected []string, got []string) bool {
    	// If length of expected and got slice are different, the test actually failed.
    	if len(expected) != len(got) {
    		return false
    	}
    
    	for i := range expected {
    		// If entry in expected is not same as entry it got, the test is failed.
    		if expected[i] != got[i] {
    			return false
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 7.5K bytes
    - Viewed (0)
  9. cmd/lock-rest-server-common_test.go

    			t.Errorf("Expected %#v, got %#v", expectedLri, gotLri)
    		}
    	}
    
    	if !locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "89ab-cdef",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", true, false)
    	} else {
    		gotLri := locker.ll.lockMap["name"]
    		expectedLri := []lockRequesterInfo(nil)
    		if !reflect.DeepEqual(expectedLri, gotLri) {
    			t.Errorf("Expected %#v, got %#v", expectedLri, gotLri)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. cni/pkg/log/uds_test.go

    	// the other one from UDS server
    	gotLogs := strings.Split(
    		strings.TrimSuffix(string(out), "\n"), "\n")
    	if want, got := len(cases)*2, len(gotLogs); want != got {
    		t.Fatalf("Number of logs want %v, got %v logs: %v", want, got, gotLogs)
    	}
    	i := 0
    	for _, l := range gotLogs {
    		var parsedLog map[string]any
    		assert.NoError(t, json.Unmarshal([]byte(l), &parsedLog))
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top