gittest

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gittest provides testing utilities for git repositories.

Index

Constants

View Source
const (
	DefaultBranch = "master"
	DefaultRemote = "origin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitOption added in v1.28.1

type CommitOption func(*commitOpts)

func CommitWithExecutableFile added in v1.28.1

func CommitWithExecutableFile(path string) CommitOption

type Repository added in v1.28.1

type Repository interface {
	git.Repository
	Commit(t *testing.T, msg string, files map[string]string, opts ...CommitOption)
	Checkout(t *testing.T, branch string)
	CheckoutB(t *testing.T, branch string)
	Tag(t *testing.T, name string, msg string)
	Push(t *testing.T)
	Merge(t *testing.T, branch string)
	PackRefs(t *testing.T)
	ResetHard(t *testing.T, ref string)
}

func ScaffoldGitRepository

func ScaffoldGitRepository(t *testing.T) Repository

Jump to

Keyboard shortcuts

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