Skip to content

Commit

Permalink
Stubs out remainder of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taigrr committed May 17, 2021
1 parent c7b2246 commit 54b7712
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion systemctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
28 changes: 26 additions & 2 deletions systemctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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) {

}

0 comments on commit 54b7712

Please sign in to comment.