forked from mirrors/homebox
tests: improve repo package coverage (#3)
* refactor and add repo tests * add CI name * use atomic for test shutdown * use go 1.19 * add timeout
This commit is contained in:
parent
888ecfde34
commit
508e2e59bd
20 changed files with 540 additions and 186 deletions
|
@ -4,21 +4,21 @@ import "github.com/hay-kot/content/backend/ent"
|
|||
|
||||
// AllRepos is a container for all the repository interfaces
|
||||
type AllRepos struct {
|
||||
Users *EntUserRepository
|
||||
AuthTokens *EntTokenRepository
|
||||
Groups *EntGroupRepository
|
||||
Locations *EntLocationRepository
|
||||
Labels *EntLabelRepository
|
||||
Users *UserRepository
|
||||
AuthTokens *TokenRepository
|
||||
Groups *GroupRepository
|
||||
Locations *LocationRepository
|
||||
Labels *LabelRepository
|
||||
Items *ItemsRepository
|
||||
}
|
||||
|
||||
func EntAllRepos(db *ent.Client) *AllRepos {
|
||||
return &AllRepos{
|
||||
Users: &EntUserRepository{db},
|
||||
AuthTokens: &EntTokenRepository{db},
|
||||
Groups: &EntGroupRepository{db},
|
||||
Locations: &EntLocationRepository{db},
|
||||
Labels: &EntLabelRepository{db},
|
||||
Users: &UserRepository{db},
|
||||
AuthTokens: &TokenRepository{db},
|
||||
Groups: &GroupRepository{db},
|
||||
Locations: &LocationRepository{db},
|
||||
Labels: &LabelRepository{db},
|
||||
Items: &ItemsRepository{db},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue