@@ -27,7 +27,7 @@ func TestGetStartTime(t *testing.T) {
27
27
runAsUser bool
28
28
}{
29
29
// Run these tests only as a user
30
- //try nonexistant unit in user mode as user
30
+ // try nonexistant unit in user mode as user
31
31
{"nonexistant" , ErrUnitNotActive , Options {UserMode : false }, true },
32
32
// try existing unit in user mode as user
33
33
{"syncthing" , ErrUnitNotActive , Options {UserMode : true }, true },
@@ -90,8 +90,8 @@ func TestGetStartTime(t *testing.T) {
90
90
t .Errorf ("Expected start diff to be positive, but got: %d" , int (diff ))
91
91
}
92
92
})
93
-
94
93
}
94
+
95
95
func TestGetNumRestarts (t * testing.T ) {
96
96
testCases := []struct {
97
97
unit string
@@ -101,7 +101,7 @@ func TestGetNumRestarts(t *testing.T) {
101
101
}{
102
102
// Run these tests only as a user
103
103
104
- //try nonexistant unit in user mode as user
104
+ // try nonexistant unit in user mode as user
105
105
{"nonexistant" , ErrValueNotSet , Options {UserMode : false }, true },
106
106
// try existing unit in user mode as user
107
107
{"syncthing" , ErrValueNotSet , Options {UserMode : true }, true },
@@ -170,7 +170,6 @@ func TestGetNumRestarts(t *testing.T) {
170
170
t .Errorf ("Expected restart count to differ by one, but difference was: %d" , secondRestarts - restarts )
171
171
}
172
172
})
173
-
174
173
}
175
174
176
175
func TestGetMemoryUsage (t * testing.T ) {
@@ -182,7 +181,7 @@ func TestGetMemoryUsage(t *testing.T) {
182
181
}{
183
182
// Run these tests only as a user
184
183
185
- //try nonexistant unit in user mode as user
184
+ // try nonexistant unit in user mode as user
186
185
{"nonexistant" , ErrValueNotSet , Options {UserMode : false }, true },
187
186
// try existing unit in user mode as user
188
187
{"syncthing" , ErrValueNotSet , Options {UserMode : true }, true },
@@ -230,8 +229,8 @@ func TestGetMemoryUsage(t *testing.T) {
230
229
t .Errorf ("Expected memory usage between nginx and user.slice to differ, but both were: %d" , bytes )
231
230
}
232
231
})
233
-
234
232
}
233
+
235
234
func TestGetPID (t * testing.T ) {
236
235
testCases := []struct {
237
236
unit string
@@ -241,7 +240,7 @@ func TestGetPID(t *testing.T) {
241
240
}{
242
241
// Run these tests only as a user
243
242
244
- //try nonexistant unit in user mode as user
243
+ // try nonexistant unit in user mode as user
245
244
{"nonexistant" , nil , Options {UserMode : false }, true },
246
245
// try existing unit in user mode as user
247
246
{"syncthing" , nil , Options {UserMode : true }, true },
@@ -296,7 +295,5 @@ func TestGetPID(t *testing.T) {
296
295
if pid == secondPid {
297
296
t .Errorf ("Expected pid != secondPid, but both were: %d" , pid )
298
297
}
299
-
300
298
})
301
-
302
299
}
0 commit comments