aboutsummaryrefslogtreecommitdiffstats
path: root/entity/dag/op_set_metadata_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-22 00:48:00 +0100
committerMichael Muré <batolettre@gmail.com>2022-12-22 00:48:00 +0100
commitd65e8837aa7bb1a6abb6892b9f2664e1b7edb02e (patch)
tree331b05b689182b4d2bf43fd7cf92ca03b055bff0 /entity/dag/op_set_metadata_test.go
parent9b98fc06489353053564b431ac0c0d73a5c55a56 (diff)
downloadgit-bug-d65e8837aa7bb1a6abb6892b9f2664e1b7edb02e.tar.gz
cache: generic withSnapshot, some cleanup
Diffstat (limited to 'entity/dag/op_set_metadata_test.go')
-rw-r--r--entity/dag/op_set_metadata_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/entity/dag/op_set_metadata_test.go b/entity/dag/op_set_metadata_test.go
index f4f20e8e..07ece013 100644
--- a/entity/dag/op_set_metadata_test.go
+++ b/entity/dag/op_set_metadata_test.go
@@ -12,6 +12,8 @@ import (
"github.com/stretchr/testify/require"
)
+var _ Snapshot = &snapshotMock{}
+
type snapshotMock struct {
ops []Operation
}
@@ -20,6 +22,10 @@ func (s *snapshotMock) AllOperations() []Operation {
return s.ops
}
+func (s *snapshotMock) AppendOperation(op Operation) {
+ s.ops = append(s.ops, op)
+}
+
func TestSetMetadata(t *testing.T) {
snap := &snapshotMock{}