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
|
@ -8,13 +8,13 @@ import (
|
|||
)
|
||||
|
||||
func Test_Group_Create(t *testing.T) {
|
||||
g, err := testRepos.Groups.Create(context.Background(), "test")
|
||||
g, err := tRepos.Groups.Create(context.Background(), "test")
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "test", g.Name)
|
||||
|
||||
// Get by ID
|
||||
foundGroup, err := testRepos.Groups.GetOneId(context.Background(), g.ID)
|
||||
foundGroup, err := tRepos.Groups.GetOneId(context.Background(), g.ID)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, g.ID, foundGroup.ID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue