mirror of
https://github.com/taigrr/systemctl.git
synced 2025-10-06 16:57:39 +08:00
improves IsActive testing
This commit is contained in:
@@ -152,9 +152,9 @@ func TestIsActive(t *testing.T) {
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
err := Start(ctx, unit, Options{UserMode: false})
|
||||
err := Restart(ctx, unit, Options{UserMode: false})
|
||||
if err != nil {
|
||||
t.Errorf("Unable to restart %s", unit)
|
||||
t.Errorf("Unable to restart %s: %v", unit, err)
|
||||
}
|
||||
time.Sleep(time.Second)
|
||||
isActive, err := IsActive(ctx, unit, Options{UserMode: false})
|
||||
|
Reference in New Issue
Block a user