mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 02:56:18 +00:00
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:
parent
800369d58a
commit
41d1c14c68
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user