test

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadBodyFile = cafs.NewMemfileBytes("bad_csv_file.csv", []byte(`
asdlkfasd,,
fm as
f;lajsmf 
a
's;f a'
sdlfj asdf`))

BadBodyFile is a bunch of bad CSV data

View Source
var BadDataFormatFile = cafs.NewMemfileBytes("abc.csv", []byte(`
"colA","colB","colC","colD"
1,2,3,4
1,2,3`))

BadDataFormatFile has weird line lengths

View Source
var BadStructureFile = cafs.NewMemfileBytes("badStructure.csv", []byte(`
colA, colB, colB, colC
1,2,3,4
1,2,3,4`))

BadStructureFile has double-named columns

Functions

func NewMemRepoFromDir added in v0.3.0

func NewMemRepoFromDir(path string) (repo.Repo, crypto.PrivKey, error)

NewMemRepoFromDir reads a director of testCases and calls createDataset on each case with the given privatekey, yeilding a repo where the peer with this pk has created each dataset in question

func NewTestRepo

func NewTestRepo(rc *regclient.Client) (mr *repo.MemRepo, err error)

NewTestRepo generates a repository usable for testing purposes

func NewTestRepoFromProfileID added in v0.3.2

func NewTestRepoFromProfileID(id profile.ID, peerNum int, dataIndex int) (repo.Repo, error)

NewTestRepoFromProfileID constructs a repo from a profileID, usable for tests

func ProfileConfig added in v0.3.0

func ProfileConfig() *config.ProfilePod

ProfileConfig returns the test profile as a config.Profile

func ReadRepoConfig added in v0.3.0

func ReadRepoConfig(path string) (pro *profile.Profile, pk crypto.PrivKey, err error)

ReadRepoConfig loads configuration data from a .yaml file

func RunRepoTests

func RunRepoTests(t *testing.T, rmf RepoMakerFunc)

RunRepoTests tests that this repo conforms to expected behaviors

Types

type RepoMakerFunc added in v0.3.0

type RepoMakerFunc func(t *testing.T) repo.Repo

RepoMakerFunc produces a new instance of a repository when called

Jump to

Keyboard shortcuts

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