Documentation ¶
Index ¶
- Variables
- func AddNTestCommitsToSpecifiedRef(t *testing.T, repo *git.Repository, refName string, n int, ...) []plumbing.Hash
- func CreateTestRSLAnnotationEntryCommit(t *testing.T, repo *git.Repository, annotation *rsl.AnnotationEntry, ...) plumbing.Hash
- func CreateTestRSLReferenceEntryCommit(t *testing.T, repo *git.Repository, entry *rsl.ReferenceEntry, ...) plumbing.Hash
- func CreateTestSignedTag(t *testing.T, repo *git.Repository, tagName string, target plumbing.Hash, ...) plumbing.Hash
- func SignTestCommit(t *testing.T, repo *git.Repository, commit *object.Commit, ...) *object.Commit
- func SignTestTag(t *testing.T, repo *git.Repository, tag *object.Tag, signingKeyBytes []byte) *object.Tag
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddNTestCommitsToSpecifiedRef ¶
func AddNTestCommitsToSpecifiedRef(t *testing.T, repo *git.Repository, refName string, n int, signingKeyBytes []byte) []plumbing.Hash
AddNTestCommitsToSpecifiedRef is a test helper that adds test commits to the specified Git ref in the provided repository. Parameter `n` determines how many commits are added. Each commit is associated with a distinct tree. The first commit contains a tree with one object (an empty blob), the second with two objects (both empty blobs), and so on. Each commit is signed using the specified key.
func CreateTestRSLAnnotationEntryCommit ¶
func CreateTestRSLAnnotationEntryCommit(t *testing.T, repo *git.Repository, annotation *rsl.AnnotationEntry, signingKeyBytes []byte) plumbing.Hash
CreateTestRSLAnnotationEntryCommit is a test helper used to create a **signed** RSL annotation using the specified GPG key. It is used to substitute for the default RSL annotation creation and signing mechanism which relies on the user's Git config.
func CreateTestRSLReferenceEntryCommit ¶
func CreateTestRSLReferenceEntryCommit(t *testing.T, repo *git.Repository, entry *rsl.ReferenceEntry, signingKeyBytes []byte) plumbing.Hash
CreateTestRSLReferenceEntryCommit is a test helper used to create a **signed** reference entry using the specified GPG key. It is used to substitute for the default RSL entry creation and signing mechanism which relies on the user's Git config.
func CreateTestSignedTag ¶
func CreateTestSignedTag(t *testing.T, repo *git.Repository, tagName string, target plumbing.Hash, signingKeyBytes []byte) plumbing.Hash
CreateTestSignedTag creates a signed tag in the repository pointing to the target object. The tag is signed using the specified key.
func SignTestCommit ¶
func SignTestCommit(t *testing.T, repo *git.Repository, commit *object.Commit, signingKeyBytes []byte) *object.Commit
SignTestCommit signs the test commit using the specified key stored in the repository. Note that the GPG key is loaded relative to the package containing the test.
Types ¶
This section is empty.