add check if it runs on CI
This commit is contained in:
parent
c6bd05a3e9
commit
3d97fc18f4
|
@ -89,8 +89,12 @@ func TestNetIOCountersAll(t *testing.T) {
|
|||
}
|
||||
// small diff is ok
|
||||
if math.Abs(float64(v[0].PacketsRecv-pr)) > 5 {
|
||||
// This test often fails in CI. so just print even if failed
|
||||
fmt.Printf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
if ci := os.Getenv("CI"); ci != "" {
|
||||
// This test often fails in CI. so just print even if failed.
|
||||
fmt.Printf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
} else {
|
||||
t.Errorf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,8 +89,12 @@ func TestNetIOCountersAll(t *testing.T) {
|
|||
}
|
||||
// small diff is ok
|
||||
if math.Abs(float64(v[0].PacketsRecv-pr)) > 5 {
|
||||
// This test often fails in CI. so just print even if failed
|
||||
fmt.Printf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
if ci := os.Getenv("CI"); ci != "" {
|
||||
// This test often fails in CI. so just print even if failed.
|
||||
fmt.Printf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
} else {
|
||||
t.Errorf("invalid sum value: %v, %v", v[0].PacketsRecv, pr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue