1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

Skip some test if CircleCI.

This commit is contained in:
shirou 2018-01-09 11:30:38 +09:00
parent 1958326a49
commit d1fb05a30b
2 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package host
import (
"fmt"
"os"
"testing"
)
@ -20,6 +21,10 @@ func TestHostInfo(t *testing.T) {
}
func TestUptime(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
t.Skip("Skip CI")
}
v, err := Uptime()
if err != nil {
t.Errorf("error %v", err)
@ -30,6 +35,9 @@ func TestUptime(t *testing.T) {
}
func TestBoot_time(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
t.Skip("Skip CI")
}
v, err := BootTime()
if err != nil {
t.Errorf("error %v", err)

View File

@ -301,6 +301,10 @@ func Test_Process_CpuPercentLoop(t *testing.T) {
}
func Test_Process_CreateTime(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
t.Skip("Skip CI")
}
p := testGetProcess()
c, err := p.CreateTime()