mirror of
https://github.com/taigrr/systemctl.git
synced 2025-09-27 12:42:27 +08:00
cleans up comments, adds short testing options to more tests
This commit is contained in:
@@ -17,6 +17,9 @@ import (
|
||||
// - your user doesn't have a PolKit rule allowing access to configure nginx
|
||||
|
||||
func TestGetStartTime(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping in short mode")
|
||||
}
|
||||
testCases := []struct {
|
||||
unit string
|
||||
err error
|
||||
@@ -132,6 +135,9 @@ func TestGetNumRestarts(t *testing.T) {
|
||||
}
|
||||
// Prove restart count increases by one after a restart
|
||||
t.Run(fmt.Sprintf("prove restart count increases by one after a restart"), func(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping in short mode")
|
||||
}
|
||||
if userString != "root" && userString != "system" {
|
||||
t.Skip("skipping superuser test while running as user")
|
||||
}
|
||||
@@ -268,6 +274,9 @@ func TestGetPID(t *testing.T) {
|
||||
})
|
||||
}
|
||||
t.Run(fmt.Sprintf("prove pid changes"), func(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping in short mode")
|
||||
}
|
||||
if userString != "root" && userString != "system" {
|
||||
t.Skip("skipping superuser test while running as user")
|
||||
}
|
||||
|
Reference in New Issue
Block a user