diff options
Diffstat (limited to 'repository/mock_repo.go')
-rw-r--r-- | repository/mock_repo.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/repository/mock_repo.go b/repository/mock_repo.go index 576e984e..b3b4cb41 100644 --- a/repository/mock_repo.go +++ b/repository/mock_repo.go @@ -5,6 +5,8 @@ import ( "fmt" "strings" + "github.com/99designs/keyring" + "github.com/MichaelMure/git-bug/util/lamport" ) @@ -15,6 +17,7 @@ var _ TestedRepo = &mockRepoForTest{} type mockRepoForTest struct { config *MemConfig globalConfig *MemConfig + keyring *keyring.ArrayKeyring blobs map[Hash][]byte trees map[Hash]string commits map[Hash]commit @@ -31,6 +34,7 @@ func NewMockRepoForTest() *mockRepoForTest { return &mockRepoForTest{ config: NewMemConfig(), globalConfig: NewMemConfig(), + keyring: keyring.NewArrayKeyring(nil), blobs: make(map[Hash][]byte), trees: make(map[Hash]string), commits: make(map[Hash]commit), @@ -49,6 +53,11 @@ func (r *mockRepoForTest) GlobalConfig() Config { return r.globalConfig } +// Keyring give access to a user-wide storage for secrets +func (r *mockRepoForTest) Keyring() Keyring { + return r.keyring +} + // GetPath returns the path to the repo. func (r *mockRepoForTest) GetPath() string { return "~/mockRepo/" |