Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthCookie ¶
GetAuthCookie returns a pointer to a test authentication cookie
func GetRepoPath ¶
func GetRepoPath() string
GetRepoPath returns the repo path to use for tests It should be considered volitile and may be destroyed at any time
func NewAPIConfig ¶
NewAPIConfig returns a new config object for the API tests
func NewLogger ¶
func NewLogger() logging.LeveledBackend
func NewNode ¶
func NewNode() (*core.OpenBazaarNode, error)
NewNode creates a new *core.OpenBazaarNode prepared for testing
Types ¶
type Repository ¶
type Repository struct { Path string Password string DB *db.SQLiteDatastore }
Repository represents a test (temporary/volitile) repository
func NewRepository ¶
func NewRepository() (*Repository, error)
NewRepository creates and initializes a new temporary repository for tests
func (*Repository) ConfigFile ¶
func (r *Repository) ConfigFile() string
ConfigFile returns the path to the test configuration file
func (*Repository) MustReset ¶
func (r *Repository) MustReset()
MustReset sets the repo state back to a blank slate but retains keys It panics upon failure instead of allowing tests to continue
func (*Repository) RemoveRepo ¶
func (r *Repository) RemoveRepo() error
RemoveRepo removes the test repository
func (*Repository) RemoveRoot ¶
func (r *Repository) RemoveRoot() error
RemoveRoot removes the profile json from the repository
func (*Repository) RemoveSettings ¶
func (r *Repository) RemoveSettings() error
RemoveSettings purges settings from the database
func (*Repository) Reset ¶
func (r *Repository) Reset() error
Reset sets the repo state back to a blank slate but retains keys Initialize the IPFS repo if it does not already exist