- 为所有 mock 实现添加 GetByIDs 方法以满足 AccountRepository 接口 - 重构 account_handler.go 中的类型断言,使用类型安全的变量 - 修复 gofmt 格式问题
19 lines
430 B
Go
19 lines
430 B
Go
package geminicli
|
|
|
|
import "testing"
|
|
|
|
func TestDriveStorageInfo(t *testing.T) {
|
|
// 测试 DriveStorageInfo 结构体
|
|
info := &DriveStorageInfo{
|
|
Limit: 100 * 1024 * 1024 * 1024, // 100GB
|
|
Usage: 50 * 1024 * 1024 * 1024, // 50GB
|
|
}
|
|
|
|
if info.Limit != 100*1024*1024*1024 {
|
|
t.Errorf("Expected limit 100GB, got %d", info.Limit)
|
|
}
|
|
if info.Usage != 50*1024*1024*1024 {
|
|
t.Errorf("Expected usage 50GB, got %d", info.Usage)
|
|
}
|
|
}
|