From 7b3e2ba9a5d49d689e60a0e238dbe2f65c9596cb Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 23 Aug 2019 16:22:22 -0700 Subject: [PATCH] test: fix put with hash test We just changed ID/"id" to IDENTITY/"identity" to match the multicodec table and avoid confusion with peer IDs, CIDs, etc. Unfortunately, this breaks the `--hash=id` flag. Luckily, I'm pretty sure nobody's actually using this. As putting a block with an identity hash is useless. If they are users, we can go about adding in backwards compatibility hacks later. This commit was moved from ipfs/interface-go-ipfs-core@6ebdbe7ef3eadc7f832592abb3b1b151d9b4febf --- coreiface/tests/dag.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreiface/tests/dag.go b/coreiface/tests/dag.go index 1ccd45d59..2f68bbf05 100644 --- a/coreiface/tests/dag.go +++ b/coreiface/tests/dag.go @@ -71,7 +71,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) { t.Fatal(err) } - nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.ID, -1) + nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.SHA3_256, -1) if err != nil { t.Fatal(err) } @@ -81,7 +81,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) { t.Fatal(err) } - if nd.Cid().String() != "bafyqabtfjbswy3dp" { + if nd.Cid().String() != "bafyrmifu7haikttpqqgc5ewvmp76z3z4ebp7h2ph4memw7dq4nt6btmxny" { t.Errorf("got wrong cid: %s", nd.Cid().String()) } }