Documentation ¶
Index ¶
- func CreateDummyFile(t *testing.T, size int64) []byte
- func LoadGolden(t *testing.T, goldenFile string) string
- func LoadInput(t *testing.T, inputFile string) []string
- func ParseIssues(output string, format string) []issue.Issue
- type File
- type GitSuite
- func (suite *GitSuite) AnnotatedTag(tag string, hash plumbing.Hash) (*bytes.Buffer, error)
- func (suite *GitSuite) Clean() error
- func (suite *GitSuite) CommitAndPush(ref string, files []File, commitMessage string, signature *object.Signature) (*bytes.Buffer, error)
- func (suite *GitSuite) CreateBranch(ref string) (*bytes.Buffer, error)
- func (suite *GitSuite) LightweightTag(tag string, hash plumbing.Hash) (*bytes.Buffer, error)
- func (suite *GitSuite) Push(ref string) (*bytes.Buffer, error)
- func (suite *GitSuite) PushFile(ref string, fileName string, fileContent []byte, commitMessage string, ...) (*bytes.Buffer, error)
- func (suite *GitSuite) ResetLastCommit() error
- func (suite *GitSuite) SetUp() error
- func (suite *GitSuite) SetUpBareRepository() error
- func (suite *GitSuite) SetUpCloneRepository() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDummyFile ¶
CreateDummyFile create a dummy file
func LoadGolden ¶
LoadGolden load golden file
Types ¶
type GitSuite ¶
type GitSuite struct { BarePath string ClonePath string LastCommit plumbing.Hash OutputFormat string PreviousCommit plumbing.Hash Repository *git.Repository RootDirectory string Server *git.Repository // contains filtered or unexported fields }
GitSuite data structure
func (*GitSuite) AnnotatedTag ¶
AnnotatedTag create annotated tag
func (*GitSuite) CommitAndPush ¶
func (suite *GitSuite) CommitAndPush(ref string, files []File, commitMessage string, signature *object.Signature) (*bytes.Buffer, error)
CommitAndPush commit and push multiple files to bare repository
func (*GitSuite) CreateBranch ¶
CreateBranch create new branch
func (*GitSuite) LightweightTag ¶
LightweightTag create new lightweight tag
func (*GitSuite) PushFile ¶
func (suite *GitSuite) PushFile(ref string, fileName string, fileContent []byte, commitMessage string, signature *object.Signature) (*bytes.Buffer, error)
PushFile commit and push single file to bare repository
func (*GitSuite) ResetLastCommit ¶
ResetLastCommit git reset --hard [origin/master|hash
func (*GitSuite) SetUpBareRepository ¶
SetUpBareRepository create new bare repository
func (*GitSuite) SetUpCloneRepository ¶
SetUpCloneRepository clone git repository
Click to show internal directories.
Click to hide internal directories.