diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-19 00:19:27 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:27 +0100 |
commit | 71f9290fdae7551f3d3ada2179ece4084304d734 (patch) | |
tree | 3494e4d4491012899ace256f534f5faea1ba2a88 /repository/mock_repo.go | |
parent | ffe35fece1b1526949107f154abc21a1a02fc74d (diff) | |
download | git-bug-71f9290fdae7551f3d3ada2179ece4084304d734.tar.gz |
identity: store the times properly
Diffstat (limited to 'repository/mock_repo.go')
-rw-r--r-- | repository/mock_repo.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/repository/mock_repo.go b/repository/mock_repo.go index 74de8f57..97a4504f 100644 --- a/repository/mock_repo.go +++ b/repository/mock_repo.go @@ -9,6 +9,8 @@ import ( "github.com/MichaelMure/git-bug/util/lamport" ) +var _ ClockedRepo = &mockRepoForTest{} + // mockRepoForTest defines an instance of Repo that can be used for testing. type mockRepoForTest struct { config map[string]string @@ -227,10 +229,18 @@ func (r *mockRepoForTest) WriteClocks() error { return nil } +func (r *mockRepoForTest) CreateTime() lamport.Time { + return r.createClock.Time() +} + func (r *mockRepoForTest) CreateTimeIncrement() (lamport.Time, error) { return r.createClock.Increment(), nil } +func (r *mockRepoForTest) EditTime() lamport.Time { + return r.editClock.Time() +} + func (r *mockRepoForTest) EditTimeIncrement() (lamport.Time, error) { return r.editClock.Increment(), nil } |