Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstallerMock ¶
type InstallerMock struct {
// InstallFunc mocks the Install method.
InstallFunc func(s string) error
// contains filtered or unexported fields
}
InstallerMock is a mock implementation of Installer.
func TestSomethingThatUsesInstaller(t *testing.T) {
// make and configure a mocked Installer
mockedInstaller := &InstallerMock{
InstallFunc: func(s string) error {
panic("mock out the Install method")
},
}
// use mockedInstaller in code that requires Installer
// and then make assertions.
}
func (*InstallerMock) Install ¶
func (mock *InstallerMock) Install(s string) error
Install calls InstallFunc.
func (*InstallerMock) InstallCalls ¶
func (mock *InstallerMock) InstallCalls() []struct { S string }
InstallCalls gets all the calls that were made to Install. Check the length with:
len(mockedInstaller.InstallCalls())
type Option ¶
type Option func(*ToolkitInstaller)
func WithArtifactRoot ¶
func WithArtifactRoot(artifactRoot *artifactRoot) Option
func WithIgnoreErrors ¶
func WithLogger ¶
func WithSourceRoot ¶
WithSourceRoot sets the root directory for locating artifacts to be installed.
type ToolkitInstaller ¶
type ToolkitInstaller struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) (*ToolkitInstaller, error)
New creates a toolkit installer with the specified options.
func (*ToolkitInstaller) ConfigFilePath ¶
func (t *ToolkitInstaller) ConfigFilePath(destDir string) string
func (*ToolkitInstaller) Install ¶
func (t *ToolkitInstaller) Install(destDir string) error
Install ensures that the required toolkit files are installed in the specified directory.
Click to show internal directories.
Click to hide internal directories.