fixtures

package
v4.0.0-rc7+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 10 Imported by: 0

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 Init

func Init()

Init set the correct path to be able to access to the fixtures files

Types

type Fixture

type Fixture struct {
	URL          string
	Tags         []string
	Head         plumbing.Hash
	PackfileHash plumbing.Hash
	DotGitHash   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)

Jump to

Keyboard shortcuts

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