{"modulePath":"github.com/readystackfree/cli","version":"v29.9.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package test\n\nPackage test is a test-only package that can be used by other cli package to write unit test.\n\nIt as an internal package and cannot be used outside of github.com/docker/cli package.\n\n## Functions\n\n```go\nfunc CompareMultipleValues(t *testing.T, value, expected string)\n```\nCompareMultipleValues compares comma-separated values, whatever the order is\n\n```go\nfunc NewWriterWithHook(actualWriter io.Writer, hook func([]byte)) *writerWithHook\n```\nNewWriterWithHook returns a io.Writer that still writes to the actualWriter but also calls the hook function after every write. It is useful to use this function when you need to wait for a writer to complete writing inside a test.\n\n```go\nfunc RandomID() string\n```\nRandomID returns a unique, 64-character ID consisting of a-z, 0-9.\n\n```go\nfunc TerminatePrompt(ctx context.Context, t *testing.T, cmd *cobra.Command, cli *FakeCli)\n```\n\n## Types\n\n```go\ntype FakeCli struct {\n\tcommand.DockerCli\n\t// contains filtered or unexported fields\n}\n```\nFakeCli emulates the default DockerCli\n\n```go\nfunc NewFakeCli(apiClient client.APIClient, opts ...func(*FakeCli)) *FakeCli\n```\nNewFakeCli returns a fake for the command.Cli interface\n\n```go\nfunc (*FakeCli) BuildKitEnabled() (bool, error)\n```\nBuildKitEnabled on the fake cli\n\n```go\nfunc (c *FakeCli) Client() client.APIClient\n```\nClient returns a docker API client\n\n```go\nfunc (c *FakeCli) ConfigFile() *configfile.ConfigFile\n```\nConfigFile returns the cli configfile object (to get client configuration)\n\n```go\nfunc (c *FakeCli) ContextStore() store.Store\n```\nContextStore returns the cli context store\n\n```go\nfunc (c *FakeCli) CurrentContext() string\n```\nCurrentContext returns the cli context\n\n```go\nfunc (*FakeCli) CurrentVersion() string\n```\nCurrentVersion returns the API version used by FakeCli.\n\n```go\nfunc (c *FakeCli) DockerEndpoint() docker.Endpoint\n```\nDockerEndpoint returns the current DockerEndpoint\n\n```go\nfunc (c *FakeCli) Err() *streams.Out\n```\nErr returns the output stream (stderr) the cli should write on\n\n```go\nfunc (c *FakeCli) ErrBuffer() *bytes.Buffer\n```\nErrBuffer Buffer returns the stderr buffer\n\n```go\nfunc (c *FakeCli) In() *streams.In\n```\nIn returns the input stream the cli will use\n\n```go\nfunc (c *FakeCli) ManifestStore() manifeststore.Store\n```\nManifestStore returns a fake store used for testing\n\n```go\nfunc (c *FakeCli) Out() *streams.Out\n```\nOut returns the output stream (stdout) the cli should write on\n\n```go\nfunc (c *FakeCli) OutBuffer() *bytes.Buffer\n```\nOutBuffer returns the stdout buffer\n\n```go\nfunc (c *FakeCli) RegistryClient(bool) registryclient.RegistryClient\n```\nRegistryClient returns a fake client for testing\n\n```go\nfunc (c *FakeCli) ResetOutputBuffers()\n```\nResetOutputBuffers resets the .OutBuffer() and.ErrBuffer() back to empty\n\n```go\nfunc (c *FakeCli) ServerInfo() command.ServerInfo\n```\nServerInfo returns API server information for the server used by this client\n\n```go\nfunc (c *FakeCli) SetConfigFile(configFile *configfile.ConfigFile)\n```\nSetConfigFile sets the \"fake\" config file\n\n```go\nfunc (c *FakeCli) SetContextStore(contextStore store.Store)\n```\nSetContextStore sets the \"fake\" context store\n\n```go\nfunc (c *FakeCli) SetCurrentContext(name string)\n```\nSetCurrentContext sets the \"fake\" current context\n\n```go\nfunc (c *FakeCli) SetDockerEndpoint(ep docker.Endpoint)\n```\nSetDockerEndpoint sets the \"fake\" docker endpoint\n\n```go\nfunc (c *FakeCli) SetErr(err *streams.Out)\n```\nSetErr sets the stderr stream for the cli to the specified io.Writer\n\n```go\nfunc (c *FakeCli) SetIn(in *streams.In)\n```\nSetIn sets the input of the cli to the specified ReadCloser\n\n```go\nfunc (c *FakeCli) SetManifestStore(manifestStore manifeststore.Store)\n```\nSetManifestStore on the fake cli\n\n```go\nfunc (c *FakeCli) SetOut(out *streams.Out)\n```\nSetOut sets the stdout stream for the cli to the specified io.Writer\n\n```go\nfunc (c *FakeCli) SetRegistryClient(registryClient registryclient.RegistryClient)\n```\nSetRegistryClient on the fake cli\n\n","path":"github.com/readystackfree/cli/internal/test","name":"test","synopsis":"Package test is a test-only package that can be used by other cli package to write unit test.","isRedistributable":true}
