File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,9 +106,6 @@ func TestNewProc_Integration(t *testing.T) {
106106 }
107107
108108 proc , err := NewProc (1 )
109- if err != nil {
110- t .Skipf ("PID 1 not available: %v" , err )
111- }
112109 rightProcCheck (t , proc , err )
113110
114111 proc , err = NewProc (999999999 )
@@ -121,8 +118,5 @@ func TestSelf_Integration(t *testing.T) {
121118 }
122119
123120 proc , err := Self ()
124- if err != nil {
125- t .Skipf ("self process not available: %v" , err )
126- }
127121 rightProcCheck (t , proc , err )
128122}
Original file line number Diff line number Diff line change @@ -133,8 +133,6 @@ func TestNewDefaultFS_Integration(t *testing.T) {
133133 }
134134
135135 fs , err := NewDefaultFS ()
136- if err != nil {
137- t .Skipf ("/sys not available: %v" , err )
138- }
136+ assert .NoError (t , err )
139137 assert .NotNil (t , fs )
140138}
Original file line number Diff line number Diff line change @@ -204,9 +204,7 @@ func TestDefaultNetClassDevices_Integration(t *testing.T) {
204204 }
205205
206206 devices , err := DefaultNetClassDevices ()
207- if err != nil {
208- t .Skipf ("/sys/class/net not available: %v" , err )
209- }
207+ assert .NoError (t , err )
210208
211209 assert .NotEmpty (t , devices , "should have at least one network device" )
212210 t .Logf ("Found %d devices: %v" , len (devices ), devices )
@@ -218,9 +216,7 @@ func TestDefaultNetClass_Integration(t *testing.T) {
218216 }
219217
220218 netClass , err := DefaultNetClass ()
221- if err != nil {
222- t .Skipf ("/sys/class/net not available: %v" , err )
223- }
219+ assert .NoError (t , err )
224220
225221 assert .NotNil (t , netClass , "should have a valid NetClass object" )
226222 t .Logf ("Got NetClass: %+v" , netClass )
Original file line number Diff line number Diff line change @@ -112,8 +112,5 @@ func TestNewDefaultFS_Integration(t *testing.T) {
112112 t .Skip ("Set TEST_INTEGRATION=true to run" )
113113 }
114114 fs , err := NewDefaultFS ()
115- if err != nil {
116- t .Skipf ("/proc or /sys unavailable: %v" , err )
117- }
118115 rightFSCheck (t , fs , err )
119116}
You can’t perform that action at this time.
0 commit comments