Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
tests: Move assert closer to function call
Browse files Browse the repository at this point in the history
Move a test assertion which seemed to have become separated from its
correct location.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Aug 10, 2018
1 parent 800369d commit 41d1c14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ func TestEventsCliAction(t *testing.T) {

// get Action function
actionFunc, ok := eventsCLICommand.Action.(func(ctx *cli.Context) error)
assert.True(ok)

flagSet := flag.NewFlagSet("events", flag.ContinueOnError)

// create a new fake context
ctx := cli.NewContext(&cli.App{}, flagSet, nil)
assert.True(ok)

err := actionFunc(ctx)
assert.Error(err, "Missing container ID")
Expand Down

0 comments on commit 41d1c14

Please sign in to comment.