aboutsummaryrefslogtreecommitdiffstats
path: root/entity/dag/operation_pack_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-02-14 10:02:01 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:19:04 +0100
commit94f06cd54defa73f5e8b79345597279e454c78e6 (patch)
tree28a1369af0b975e80ed714d5dfacc6ef7ed8911b /entity/dag/operation_pack_test.go
parent71e22d9f6e49ce0c3bc3b177323b17652a1c45a2 (diff)
downloadgit-bug-94f06cd54defa73f5e8b79345597279e454c78e6.tar.gz
entity: pass the identity resolver instead of defining it once
Having the resolver in Definition doesn't actually work well as the resolver is very situational.
Diffstat (limited to 'entity/dag/operation_pack_test.go')
-rw-r--r--entity/dag/operation_pack_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/entity/dag/operation_pack_test.go b/entity/dag/operation_pack_test.go
index ac979776..a12382af 100644
--- a/entity/dag/operation_pack_test.go
+++ b/entity/dag/operation_pack_test.go
@@ -9,7 +9,7 @@ import (
)
func TestOperationPackReadWrite(t *testing.T) {
- repo, id1, _, def := makeTestContext()
+ repo, id1, _, resolver, def := makeTestContext()
opp := &operationPack{
Author: id1,
@@ -27,7 +27,7 @@ func TestOperationPackReadWrite(t *testing.T) {
commit, err := repo.ReadCommit(commitHash)
require.NoError(t, err)
- opp2, err := readOperationPack(def, repo, commit)
+ opp2, err := readOperationPack(def, repo, resolver, commit)
require.NoError(t, err)
require.Equal(t, opp, opp2)
@@ -46,7 +46,7 @@ func TestOperationPackReadWrite(t *testing.T) {
}
func TestOperationPackSignedReadWrite(t *testing.T) {
- repo, id1, _, def := makeTestContext()
+ repo, id1, _, resolver, def := makeTestContext()
err := id1.(*identity.Identity).Mutate(repo, func(orig *identity.Mutator) {
orig.Keys = append(orig.Keys, identity.GenerateKey())
@@ -69,7 +69,7 @@ func TestOperationPackSignedReadWrite(t *testing.T) {
commit, err := repo.ReadCommit(commitHash)
require.NoError(t, err)
- opp2, err := readOperationPack(def, repo, commit)
+ opp2, err := readOperationPack(def, repo, resolver, commit)
require.NoError(t, err)
require.Equal(t, opp, opp2)