gittest

package
v0.0.0-...-b5b5a37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(t *testing.T, ts *httptest.Server, repo, worktree string, opts Options) *git.Repository

func CommitAll

func CommitAll(t *testing.T, r *git.Repository, msg string)

func CreateRemoteBranch

func CreateRemoteBranch(t *testing.T, r *git.Repository, branchName string)

func NewServer

func NewServer(t *testing.T, repo, dir string, opts Options) *httptest.Server

func NewServerWithRepository

func NewServerWithRepository(t *testing.T, repo, dir string, opts Options) *httptest.Server

func NewTestServer

func NewTestServer(t *testing.T, opts Options) *httptest.Server

NewTestServer creates a git server with the local copy of "github.com/aquasecurity/trivy-test-repo". If the test repository doesn't exist, it suggests running 'mage test:unit'.

func PushTags

func PushTags(t *testing.T, r *git.Repository)

func SetTag

func SetTag(t *testing.T, r *git.Repository, tag string)

Types

type Options

type Options struct {
	Username string
	Password string
}

Options contains configuration options for git server authentication

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址