gittest

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 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

type CommitOption func(*commitOpts)

func CommitWithExecutableFile

func CommitWithExecutableFile(path string) CommitOption

type Repository

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