From 54b77122a558a7894c7e23f261ade2a2806f3413 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Sun, 16 May 2021 23:08:42 -0700 Subject: [PATCH] Stubs out remainder of tests --- systemctl.go | 2 +- systemctl_test.go | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/systemctl.go b/systemctl.go index 83927a2..0a68015 100644 --- a/systemctl.go +++ b/systemctl.go @@ -146,7 +146,7 @@ func IsFailed(ctx context.Context, unit string, opts Options) (bool, error) { // these unit files to /dev/null, making it impossible to start them. // // Notably, Mask may return ErrDoesNotExist if a unit doesn't exist, but it will -// ocntinue masking anyway. +// continue masking anyway. func Mask(ctx context.Context, unit string, opts Options) error { var args = []string{"mask", "--system", unit} if opts.UserMode { diff --git a/systemctl_test.go b/systemctl_test.go index a1b7893..0a3eb9c 100644 --- a/systemctl_test.go +++ b/systemctl_test.go @@ -238,12 +238,20 @@ func TestIsEnabled(t *testing.T) { if isEnabled { t.Errorf("IsEnabled didn't return false for %s", unit) } - Unmask(ctx, unit, Options{UserMode: false}) - Enable(ctx, unit, Options{UserMode: false}) + Unmask(ctx, unit, Options{UserMode: userMode}) + Enable(ctx, unit, Options{UserMode: userMode}) }) } +func TestMask(t *testing.T) { + +} + +func TestRestart(t *testing.T) { + +} + // Runs through all defined Properties in parallel and checks for error cases func TestShow(t *testing.T) { if testing.Short() { @@ -265,3 +273,19 @@ func TestShow(t *testing.T) { }) } } + +func TestStart(t *testing.T) { + +} + +func TestStatus(t *testing.T) { + +} + +func TestStop(t *testing.T) { + +} + +func TestUnmask(t *testing.T) { + +}