Documentation ¶
Index ¶
- func AssertCmdsPartiallyMatch(t *testing.T, expectedCmds []string, actualExecutedCmds []*exec.Cmd)
- func AssertEnvValuesMatch(t *testing.T, expectedEnvs conv.KeyValues, actualCmdEnvs []string)
- func AssertErrorExpectation(t *testing.T, err error, exp *ErrorExpectation)
- func AssertFileMatchesExpectation(fe *FileExpectation) (isExpectationMatched bool, nonMatchedReason string, err error)
- func AssertFileMatchesExpectationOS(filePath string, fe *FileExpectation) (isMatched bool, reason string, err error)
- func DeleteFileIfExists(filePath string) error
- func DeleteFiles(files []string) error
- func StartFTPServer(ctx context.Context, port int, waitForStarting time.Duration) (*url.URL, error)
- func StartHTTPServer(isHTTPS bool) (u *url.URL, srv *httptest.Server, err error)
- type ChownInput
- type ErrorExpectation
- type FakeFile
- type FileExpectation
- type FsManagerMock
- func (fmm *FsManagerMock) Chmod(targetFilePath string, mode os.FileMode) error
- func (fmm *FsManagerMock) Chown(targetFilePath, userName, groupName string) error
- func (fmm *FsManagerMock) CopyLocalFile(sourceFilePath, targetFilePath string, mode os.FileMode) error
- func (fmm *FsManagerMock) CreateDirPathIfNeeded(targetFilePath string, mode os.FileMode) error
- func (fmm *FsManagerMock) DownloadFile(ctx context.Context, targetLocation string, sourceURL *url.URL, ...) error
- func (fmm *FsManagerMock) FileExists(filePath string) (bool, error)
- func (fmm *FsManagerMock) MoveFile(sourceFilePath, targetFilePath string) error
- func (fmm *FsManagerMock) ReadEncodedFile(encodingName, fileName string) (contentsUtf8 string, err error)
- func (fmm *FsManagerMock) ReadFile(filePath string) (content string, err error)
- func (fmm *FsManagerMock) Remove(filePath string) error
- func (fmm *FsManagerMock) Stat(name string) (os.FileInfo, error)
- func (fmm *FsManagerMock) WriteFile(name, contents string, mode os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEnvValuesMatch ¶
func AssertErrorExpectation ¶
func AssertErrorExpectation(t *testing.T, err error, exp *ErrorExpectation)
func AssertFileMatchesExpectation ¶
func AssertFileMatchesExpectation(fe *FileExpectation) (isExpectationMatched bool, nonMatchedReason string, err error)
func AssertFileMatchesExpectationOS ¶
func AssertFileMatchesExpectationOS(filePath string, fe *FileExpectation) (isMatched bool, reason string, err error)
func DeleteFileIfExists ¶
func DeleteFiles ¶
func StartFTPServer ¶
Types ¶
type ChownInput ¶
type ErrorExpectation ¶
type FileExpectation ¶
type FsManagerMock ¶
type FsManagerMock struct { FileExistsInputPath []string FileExistsErrToReturn error FileExistsExistsToReturn bool ChownInputs []ChownInput ChownErrorToReturn error StatInputName []string StatOutputFileInfo os.FileInfo StatOutputError error }
func (*FsManagerMock) Chmod ¶
func (fmm *FsManagerMock) Chmod(targetFilePath string, mode os.FileMode) error
func (*FsManagerMock) Chown ¶
func (fmm *FsManagerMock) Chown(targetFilePath, userName, groupName string) error
func (*FsManagerMock) CopyLocalFile ¶
func (fmm *FsManagerMock) CopyLocalFile(sourceFilePath, targetFilePath string, mode os.FileMode) error
func (*FsManagerMock) CreateDirPathIfNeeded ¶
func (fmm *FsManagerMock) CreateDirPathIfNeeded(targetFilePath string, mode os.FileMode) error
func (*FsManagerMock) DownloadFile ¶
func (*FsManagerMock) FileExists ¶
func (fmm *FsManagerMock) FileExists(filePath string) (bool, error)
func (*FsManagerMock) MoveFile ¶
func (fmm *FsManagerMock) MoveFile(sourceFilePath, targetFilePath string) error
func (*FsManagerMock) ReadEncodedFile ¶
func (fmm *FsManagerMock) ReadEncodedFile(encodingName, fileName string) (contentsUtf8 string, err error)
func (*FsManagerMock) ReadFile ¶
func (fmm *FsManagerMock) ReadFile(filePath string) (content string, err error)
func (*FsManagerMock) Remove ¶
func (fmm *FsManagerMock) Remove(filePath string) error
Click to show internal directories.
Click to hide internal directories.