Skip to content

Commit

Permalink
tests: Fix gofmt and ineffassign issues
Browse files Browse the repository at this point in the history
Fixup for gofmt and ineffassign warnings.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Sep 25, 2017
1 parent 2212ef7 commit fc87e7b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ func TestMainCreateRuntime(t *testing.T) {

// override sub-commands
runtimeCommands = []cli.Command{
cli.Command{
{
Name: cmd,
Action: func(context *cli.Context) error {
return errors.New(msg)
Expand Down Expand Up @@ -1082,7 +1082,6 @@ func TestMainFatalWriter(t *testing.T) {

const cmd = "foo"
const msg = "moo FAILURE"
exitStatus := 0

// create buffer to save logger output
buf := &bytes.Buffer{}
Expand All @@ -1098,11 +1097,11 @@ func TestMainFatalWriter(t *testing.T) {
// save all output
ccLog.Out = buf

cli.OsExiter = func(status int) { exitStatus = status }
cli.OsExiter = func(status int) {}

// override sub-commands
runtimeCommands = []cli.Command{
cli.Command{
{
Name: cmd,
Action: func(context *cli.Context) error {
return cli.NewExitError(msg, 42)
Expand Down

0 comments on commit fc87e7b

Please sign in to comment.