Documentation ¶
Overview ¶
Package test is a test-only package that can be used by other cli package to write unit test.
It as an internal package and cannot be used outside of github.com/docker/cli package.
Index ¶
- func NewFakeStore() credentials.Store
- type FakeCli
- func (c *FakeCli) Client() client.APIClient
- func (c *FakeCli) ConfigFile() *configfile.ConfigFile
- func (c *FakeCli) Err() io.Writer
- func (c *FakeCli) ErrBuffer() *bytes.Buffer
- func (c *FakeCli) In() *command.InStream
- func (c *FakeCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error)
- func (c *FakeCli) Out() *command.OutStream
- func (c *FakeCli) OutBuffer() *bytes.Buffer
- func (c *FakeCli) ServerInfo() command.ServerInfo
- func (c *FakeCli) SetConfigFile(configfile *configfile.ConfigFile)
- func (c *FakeCli) SetErr(err *bytes.Buffer)
- func (c *FakeCli) SetIn(in *command.InStream)
- func (c *FakeCli) SetNotaryClient(notaryClientFunc notaryClientFuncType)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeStore ¶
func NewFakeStore() credentials.Store
NewFakeStore creates a new file credentials store.
Types ¶
type FakeCli ¶
FakeCli emulates the default DockerCli
func NewFakeCli ¶
NewFakeCli returns a fake for the command.Cli interface
func (*FakeCli) ConfigFile ¶
func (c *FakeCli) ConfigFile() *configfile.ConfigFile
ConfigFile returns the cli configfile object (to get client configuration)
func (*FakeCli) NotaryClient ¶
func (c *FakeCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error)
NotaryClient returns an err for testing unless defined
func (*FakeCli) ServerInfo ¶
func (c *FakeCli) ServerInfo() command.ServerInfo
ServerInfo returns API server information for the server used by this client
func (*FakeCli) SetConfigFile ¶
func (c *FakeCli) SetConfigFile(configfile *configfile.ConfigFile)
SetConfigFile sets the "fake" config file
func (*FakeCli) SetNotaryClient ¶
func (c *FakeCli) SetNotaryClient(notaryClientFunc notaryClientFuncType)
SetNotaryClient sets the internal getter for retrieving a NotaryClient
Directories ¶
Path | Synopsis |
---|---|
Package builders helps you create struct for your unit test while keeping them expressive.
|
Package builders helps you create struct for your unit test while keeping them expressive. |
Click to show internal directories.
Click to hide internal directories.