Skip to content

Commit

Permalink
✅ add test for internal/errors/runner
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi authored and kevindiu committed Feb 18, 2021
1 parent 15f5c99 commit 6ba08aa
Show file tree
Hide file tree
Showing 2 changed files with 575 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/errors/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,37 @@
package errors

var (
// ErrDaemonStartFailed represents a function to generate an error that failed to start daemon.
ErrDaemonStartFailed = func(err error) error {
return Wrap(err, "failed to start daemon")
}

// ErrDaemonStopFailed represents a function to generate an error that failed to stop daemon.
ErrDaemonStopFailed = func(err error) error {
return Wrap(err, "failed to stop daemon")
}

// ErrStartFunc represents a function to generate an error that occurred in the start function.
ErrStartFunc = func(name string, err error) error {
return Wrapf(err, "error occurred in runner.Start at %s", name)
}

// ErrPreStopFunc represents a function to generate an error that occurred in the pre-stop function.
ErrPreStopFunc = func(name string, err error) error {
return Wrapf(err, "error occurred in runner.PreStop at %s", name)
}

// ErrStopFunc represents a function to generate an error that occurred in the stop function.
ErrStopFunc = func(name string, err error) error {
return Wrapf(err, "error occurred in runner.Stop at %s", name)
}

// ErrPostStopFunc represents a function to generate an error that occurred in the post-stop function.
ErrPostStopFunc = func(name string, err error) error {
return Wrapf(err, "error occurred in runner.PostStop at %s", name)
}

// ErrRunnerWait represents a function to generate an error during runner.Wait.
ErrRunnerWait = func(name string, err error) error {
return Wrapf(err, "error occurred in runner.Wait at %s", name)
}
Expand Down
Loading

0 comments on commit 6ba08aa

Please sign in to comment.