improves IsActive testing

This commit is contained in:
Tai Groot
2021-05-16 22:32:24 -07:00
parent e941c90f0d
commit 27c2ad77c8
2 changed files with 25 additions and 2 deletions

View File

@@ -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})