From fe4237df3c62bd6dfd1f385893295f93072d0e51 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 25 Jan 2021 12:39:34 +0100 Subject: entity: readAll and more testing --- repository/mock_repo.go | 4 ++-- repository/repo.go | 1 + repository/repo_testing.go | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'repository') diff --git a/repository/mock_repo.go b/repository/mock_repo.go index 095ad61c..adbceec2 100644 --- a/repository/mock_repo.go +++ b/repository/mock_repo.go @@ -202,12 +202,12 @@ func NewMockRepoData() *mockRepoData { } func (r *mockRepoData) FetchRefs(remote string, refSpec string) (string, error) { - return "", nil + panic("implement me") } // PushRefs push git refs to a remote func (r *mockRepoData) PushRefs(remote string, refSpec string) (string, error) { - return "", nil + panic("implement me") } func (r *mockRepoData) StoreData(data []byte) (Hash, error) { diff --git a/repository/repo.go b/repository/repo.go index 87426333..c31afa22 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -130,6 +130,7 @@ type RepoData interface { ReadCommit(hash Hash) (Commit, error) // GetTreeHash return the git tree hash referenced in a commit + // Deprecated GetTreeHash(commit Hash) (Hash, error) // ResolveRef returns the hash of the target commit of the given ref diff --git a/repository/repo_testing.go b/repository/repo_testing.go index 92aa1691..8fc109bb 100644 --- a/repository/repo_testing.go +++ b/repository/repo_testing.go @@ -10,6 +10,9 @@ import ( "github.com/MichaelMure/git-bug/util/lamport" ) +// TODO: add tests for RepoBleve +// TODO: add tests for RepoStorage + func CleanupTestRepos(repos ...Repo) { var firstErr error for _, repo := range repos { -- cgit