tests: Move assert closer to function call

Move a test assertion which seemed to have become separated from its
correct location.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2018-08-09 14:17:54 +01:00
parent 800369d58a
commit 41d1c14c68

View File

@ -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")