Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Canread
Gopsutil
提交
bddb35d0
G
Gopsutil
项目概览
Canread
/
Gopsutil
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gopsutil
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bddb35d0
编写于
12月 05, 2014
作者:
J
James Cunningham
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated Tests to snake_case
上级
039b9def
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
5 deletion
+5
-5
disk_test.go
disk_test.go
+2
-2
host_test.go
host_test.go
+1
-1
mem_test.go
mem_test.go
+2
-2
未找到文件。
disk_test.go
浏览文件 @
bddb35d0
...
...
@@ -58,7 +58,7 @@ func TestDiskUsageStat_String(t *testing.T) {
InodesFree
:
6000
,
InodesUsedPercent
:
49.1
,
}
e
:=
`{"path":"/","total":1000,"free":2000,"used":3000,"used
Percent":50.1,"inodesTotal":4000,"inodesUsed":5000,"inodesFree":6000,"inodesUsedP
ercent":49.1}`
e
:=
`{"path":"/","total":1000,"free":2000,"used":3000,"used
_percent":50.1,"inodes_total":4000,"inodes_used":5000,"inodes_free":6000,"inodes_used_p
ercent":49.1}`
if
e
!=
fmt
.
Sprintf
(
"%v"
,
v
)
{
t
.
Errorf
(
"DiskUsageStat string is invalid: %v"
,
v
)
}
...
...
@@ -86,7 +86,7 @@ func TestDiskIOCountersStat_String(t *testing.T) {
WriteBytes
:
400
,
SerialNumber
:
"SERIAL"
,
}
e
:=
`{"read
Count":100,"writeCount":200,"readBytes":300,"writeBytes":400,"readTime":0,"writeTime":0,"name":"sd01","ioTime":0,"serialN
umber":"SERIAL"}`
e
:=
`{"read
_count":100,"write_count":200,"read_bytes":300,"write_bytes":400,"read_time":0,"write_time":0,"name":"sd01","io_time":0,"serial_n
umber":"SERIAL"}`
if
e
!=
fmt
.
Sprintf
(
"%v"
,
v
)
{
t
.
Errorf
(
"DiskUsageStat string is invalid: %v"
,
v
)
}
...
...
host_test.go
浏览文件 @
bddb35d0
...
...
@@ -47,7 +47,7 @@ func TestHostInfoStat_String(t *testing.T) {
OS
:
"linux"
,
Platform
:
"ubuntu"
,
}
e
:=
`{"hostname":"test","uptime":3000,"procs":100,"os":"linux","platform":"ubuntu","platform
Family":"","platformVersion":"","virtualizationSystem":"","virtualizationR
ole":""}`
e
:=
`{"hostname":"test","uptime":3000,"procs":100,"os":"linux","platform":"ubuntu","platform
_family":"","platform_version":"","virtualization_system":"","virtualization_r
ole":""}`
if
e
!=
fmt
.
Sprintf
(
"%v"
,
v
)
{
t
.
Errorf
(
"HostInfoStat string is invalid: %v"
,
v
)
}
...
...
mem_test.go
浏览文件 @
bddb35d0
...
...
@@ -35,7 +35,7 @@ func TestVirtualMemoryStat_String(t *testing.T) {
UsedPercent
:
30.1
,
Free
:
40
,
}
e
:=
`{"total":10,"available":20,"used":30,"used
P
ercent":30.1,"free":40,"active":0,"inactive":0,"buffers":0,"cached":0,"wired":0,"shared":0}`
e
:=
`{"total":10,"available":20,"used":30,"used
_p
ercent":30.1,"free":40,"active":0,"inactive":0,"buffers":0,"cached":0,"wired":0,"shared":0}`
if
e
!=
fmt
.
Sprintf
(
"%v"
,
v
)
{
t
.
Errorf
(
"VirtualMemoryStat string is invalid: %v"
,
v
)
}
...
...
@@ -48,7 +48,7 @@ func TestSwapMemoryStat_String(t *testing.T) {
Free
:
40
,
UsedPercent
:
30.1
,
}
e
:=
`{"total":10,"used":30,"free":40,"used
P
ercent":30.1,"sin":0,"sout":0}`
e
:=
`{"total":10,"used":30,"free":40,"used
_p
ercent":30.1,"sin":0,"sout":0}`
if
e
!=
fmt
.
Sprintf
(
"%v"
,
v
)
{
t
.
Errorf
(
"SwapMemoryStat string is invalid: %v"
,
v
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录