Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthCookie ¶
func GetAuthCookie() *http.Cookie
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 ¶
func NewAPIConfig() (*repo.APIConfig, error)
NewAPIConfig returns a new config object for the API tests
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