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) ClientInfo() command.ClientInfo
- 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) ManifestStore() manifeststore.Store
- 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) RegistryClient(insecure bool) registryclient.RegistryClient
- func (c *FakeCli) ServerInfo() command.ServerInfo
- func (c *FakeCli) SetClientInfo(clientInfoFunc clientInfoFuncType)
- func (c *FakeCli) SetConfigFile(configfile *configfile.ConfigFile)
- func (c *FakeCli) SetErr(err *bytes.Buffer)
- func (c *FakeCli) SetIn(in *command.InStream)
- func (c *FakeCli) SetManifestStore(store manifeststore.Store)
- func (c *FakeCli) SetNotaryClient(notaryClientFunc notaryClientFuncType)
- func (c *FakeCli) SetRegistryClient(client registryclient.RegistryClient)
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) ClientInfo ¶
func (c *FakeCli) ClientInfo() command.ClientInfo
ClientInfo returns client information
func (*FakeCli) ConfigFile ¶
func (c *FakeCli) ConfigFile() *configfile.ConfigFile
ConfigFile returns the cli configfile object (to get client configuration)
func (*FakeCli) ManifestStore ¶
func (c *FakeCli) ManifestStore() manifeststore.Store
ManifestStore returns a fake store used for testing
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) RegistryClient ¶
func (c *FakeCli) RegistryClient(insecure bool) registryclient.RegistryClient
RegistryClient returns a fake client for testing
func (*FakeCli) ServerInfo ¶
func (c *FakeCli) ServerInfo() command.ServerInfo
ServerInfo returns API server information for the server used by this client
func (*FakeCli) SetClientInfo ¶
func (c *FakeCli) SetClientInfo(clientInfoFunc clientInfoFuncType)
SetClientInfo sets the internal getter for retrieving a ClientInfo
func (*FakeCli) SetConfigFile ¶
func (c *FakeCli) SetConfigFile(configfile *configfile.ConfigFile)
SetConfigFile sets the "fake" config file
func (*FakeCli) SetManifestStore ¶
func (c *FakeCli) SetManifestStore(store manifeststore.Store)
SetManifestStore on the fake cli
func (*FakeCli) SetNotaryClient ¶
func (c *FakeCli) SetNotaryClient(notaryClientFunc notaryClientFuncType)
SetNotaryClient sets the internal getter for retrieving a NotaryClient
func (*FakeCli) SetRegistryClient ¶
func (c *FakeCli) SetRegistryClient(client registryclient.RegistryClient)
SetRegistryClient on the fake cli
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. |