mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
net: because lsof failed on drone.io, skip TestNetConnections if CI.
This commit is contained in:
parent
0062ae2bfa
commit
4d0f737301
@ -2,6 +2,7 @@ package net
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@ -122,6 +123,10 @@ func TestNetInterfaces(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNetConnections(t *testing.T) {
|
||||
if ci := os.Getenv("CI"); ci != "" { // skip if test on drone.io
|
||||
return
|
||||
}
|
||||
|
||||
v, err := NetConnections("inet")
|
||||
if err != nil {
|
||||
t.Errorf("could not get NetConnections: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user