From febdeab87192b3b2ce92b85e18872b7aa820a23c Mon Sep 17 00:00:00 2001 From: shirou Date: Wed, 30 Aug 2023 14:07:47 +0000 Subject: [PATCH] chore: change CIRCLECI environment variable to CI. --- cpu/cpu_test.go | 8 ++++---- host/host_test.go | 4 ++-- process/process_test.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpu/cpu_test.go b/cpu/cpu_test.go index 4202ce841..688660a1a 100644 --- a/cpu/cpu_test.go +++ b/cpu/cpu_test.go @@ -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) } @@ -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) } diff --git a/host/host_test.go b/host/host_test.go index 29cb9d2db..17ced6dac 100644 --- a/host/host_test.go +++ b/host/host_test.go @@ -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") } @@ -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() diff --git a/process/process_test.go b/process/process_test.go index 61e2a7acb..fc44963ef 100644 --- a/process/process_test.go +++ b/process/process_test.go @@ -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") }