Skip to content

Commit

Permalink
Skip some test if CircleCI.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed Jan 9, 2018
1 parent 1958326 commit d1fb05a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions host/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package host

import (
"fmt"
"os"
"testing"
)

Expand All @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions process/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d1fb05a

Please sign in to comment.