aboutsummaryrefslogtreecommitdiffstats
path: root/repository/gogit_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-19 16:12:49 +0100
committerMichael Muré <batolettre@gmail.com>2022-12-19 18:09:37 +0100
commit60d40d60e9f91247b61f541888f1469bff44f573 (patch)
treea3cdfd90a06358e7648a4a85a36cee680e121642 /repository/gogit_test.go
parent3b62fe0a4c7b3f1ae4f9a163b6c483444b5a8d20 (diff)
downloadgit-bug-60d40d60e9f91247b61f541888f1469bff44f573.tar.gz
repo: proper reduced interface for full-text indexing
Additionally, remove and concentrate quite a lot of complexity from the cache layer into a "per app" single site where to configure how indexing is done.
Diffstat (limited to 'repository/gogit_test.go')
-rw-r--r--repository/gogit_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/repository/gogit_test.go b/repository/gogit_test.go
index a3de0a03..02bd42fd 100644
--- a/repository/gogit_test.go
+++ b/repository/gogit_test.go
@@ -65,24 +65,19 @@ func TestGoGitRepo_Indexes(t *testing.T) {
plainRoot := goGitRepoDir(t, repo)
// Can create indices
- indexA, err := repo.GetBleveIndex("a")
+ indexA, err := repo.GetIndex("a")
require.NoError(t, err)
require.NotZero(t, indexA)
require.FileExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "a", "index_meta.json"))
require.FileExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "a", "store"))
- indexB, err := repo.GetBleveIndex("b")
+ indexB, err := repo.GetIndex("b")
require.NoError(t, err)
require.NotZero(t, indexB)
require.DirExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "b"))
// Can get an existing index
- indexA, err = repo.GetBleveIndex("a")
+ indexA, err = repo.GetIndex("a")
require.NoError(t, err)
require.NotZero(t, indexA)
-
- // Can delete an index
- err = repo.ClearBleveIndex("a")
- require.NoError(t, err)
- require.NoDirExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "a"))
}