fixtures

package module
Version: v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 324

README

go-git-fixtures

git repository fixtures being use by go-git

Documentation

Index

Constants

View Source
const DataFolder = "data"

Variables

View Source
var RootFolder = ""

Functions

func Clean

func Clean() error

Clean cleans all the temporal files created

func EnsureIsBare

func EnsureIsBare(fs billy.Filesystem) error

EnsureIsBare overrides the config file with one where bare is true.

func Init

func Init() error

Init sets the correct path to access the fixtures files

Types

type Fixture

type Fixture struct {
	URL          string
	Tags         []string
	Head         plumbing.Hash
	PackfileHash plumbing.Hash
	DotGitHash   plumbing.Hash
	WorktreeHash plumbing.Hash
	ObjectsCount int32
}

func (*Fixture) DotGit

func (f *Fixture) DotGit() billy.Filesystem

DotGit creates a new temporary directory and unpacks the repository .git directory into it. Multiple calls to DotGit returns different directories.

func (*Fixture) Idx

func (f *Fixture) Idx() *os.File

func (*Fixture) Is

func (f *Fixture) Is(tag string) bool

func (*Fixture) Packfile

func (f *Fixture) Packfile() *os.File

func (*Fixture) Worktree

func (f *Fixture) Worktree() billy.Filesystem

type Fixtures

type Fixtures []*Fixture

func All

func All() Fixtures

func Basic

func Basic() Fixtures

func ByTag

func ByTag(tag string) Fixtures

func ByURL

func ByURL(url string) Fixtures

func (Fixtures) ByTag

func (g Fixtures) ByTag(tag string) Fixtures

func (Fixtures) ByURL

func (g Fixtures) ByURL(url string) Fixtures

func (Fixtures) Exclude

func (g Fixtures) Exclude(tag string) Fixtures

func (Fixtures) One

func (g Fixtures) One() *Fixture

func (Fixtures) Test

func (g Fixtures) Test(c *check.C, test func(*Fixture))

type Suite

type Suite struct{}

func (*Suite) SetUpSuite

func (s *Suite) SetUpSuite(c *check.C)

func (*Suite) TearDownSuite

func (s *Suite) TearDownSuite(c *check.C)

Source Files

Jump to

Keyboard shortcuts

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