Skip to content

Commit

Permalink
Merge pull request #1518 from shirou/feature/remove_circleci
Browse files Browse the repository at this point in the history
chore: change CIRCLECI environment variable to CI.
  • Loading branch information
shirou committed Aug 30, 2023
2 parents a09263d + febdeab commit faad806
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cpu/cpu_test.go
Expand Up @@ -138,8 +138,8 @@ func testCPUPercent(t *testing.T, percpu bool) {
if err != nil {
t.Errorf("error %v", err)
}
// Skip CircleCI which CPU num is different
if os.Getenv("CIRCLECI") != "true" {
// Skip CI which CPU num is different
if os.Getenv("CI") != "true" {
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
}
Expand Down Expand Up @@ -172,8 +172,8 @@ func testCPUPercentLastUsed(t *testing.T, percpu bool) {
if err != nil {
t.Errorf("error %v", err)
}
// Skip CircleCI which CPU num is different
if os.Getenv("CIRCLECI") != "true" {
// Skip CI which CPU num is different
if os.Getenv("CI") != "true" {
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
}
Expand Down
4 changes: 2 additions & 2 deletions host/host_test.go
Expand Up @@ -33,7 +33,7 @@ func TestHostInfo(t *testing.T) {
}

func TestUptime(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
if os.Getenv("CI") == "true" {
t.Skip("Skip CI")
}

Expand All @@ -48,7 +48,7 @@ func TestUptime(t *testing.T) {
}

func TestBoot_time(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
if os.Getenv("CI") == "true" {
t.Skip("Skip CI")
}
v, err := BootTime()
Expand Down
2 changes: 1 addition & 1 deletion process/process_test.go
Expand Up @@ -502,7 +502,7 @@ func Test_Process_CpuPercentLoop(t *testing.T) {
}

func Test_Process_CreateTime(t *testing.T) {
if os.Getenv("CIRCLECI") == "true" {
if os.Getenv("CI") == "true" {
t.Skip("Skip CI")
}

Expand Down

0 comments on commit faad806

Please sign in to comment.