aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bug/select/select_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-21 21:54:36 +0100
committerMichael Muré <batolettre@gmail.com>2022-12-21 21:54:36 +0100
commit9b98fc06489353053564b431ac0c0d73a5c55a56 (patch)
tree67cab95c0c6167c0982516a2dda610bd5ece9eab /commands/bug/select/select_test.go
parent905c9a90f134842b97e2cf729d8b11ff59bfd766 (diff)
downloadgit-bug-9b98fc06489353053564b431ac0c0d73a5c55a56.tar.gz
cache: tie up the refactor up to compiling
Diffstat (limited to 'commands/bug/select/select_test.go')
-rw-r--r--commands/bug/select/select_test.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/commands/bug/select/select_test.go b/commands/bug/select/select_test.go
index 702700f4..5533ac2b 100644
--- a/commands/bug/select/select_test.go
+++ b/commands/bug/select/select_test.go
@@ -13,8 +13,11 @@ import (
func TestSelect(t *testing.T) {
repo := repository.CreateGoGitTestRepo(t, false)
- repoCache, err := cache.NewRepoCache(repo)
+ repoCache, events, err := cache.NewRepoCache(repo)
require.NoError(t, err)
+ for event := range events {
+ require.NoError(t, event.Err)
+ }
_, _, err = ResolveBug(repoCache, []string{})
require.Equal(t, ErrNoValidId, err)
@@ -28,18 +31,18 @@ func TestSelect(t *testing.T) {
// generate a bunch of bugs
- rene, err := repoCache.NewIdentity("René Descartes", "rene@descartes.fr")
+ rene, err := repoCache.Identities().New("René Descartes", "rene@descartes.fr")
require.NoError(t, err)
for i := 0; i < 10; i++ {
- _, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
+ _, _, err := repoCache.Bugs().NewRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
}
// and two more for testing
- b1, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
+ b1, _, err := repoCache.Bugs().NewRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
- b2, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
+ b2, _, err := repoCache.Bugs().NewRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
err = Select(repoCache, b1.Id())