Skip to content

Commit

Permalink
Cover the changes with unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Sirot <[email protected]>
  • Loading branch information
Jean-Christophe Sirot committed Mar 13, 2019
1 parent 37fcaf7 commit a1af6e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/command/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,12 @@ func TestNewDockerCliAndOperators(t *testing.T) {
assert.NilError(t, err)
assert.Equal(t, string(errStream), "error")
}

func TestInitializeShouldAlwaysCreateTheContextStore(t *testing.T) {
cli, err := NewDockerCli()
assert.NilError(t, err)
assert.NilError(t, cli.Initialize(flags.NewClientOptions(), WithInitializeClient(func(cli *DockerCli) (client.APIClient, error) {
return client.NewClientWithOpts()
})))
assert.Check(t, cli.ContextStore() != nil)
}

0 comments on commit a1af6e2

Please sign in to comment.