Skip to content

Commit 3b9a723

Browse files
committed
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@6ebdbe7
1 parent 5b677a6 commit 3b9a723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coreiface/tests/dag.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) {
7171
t.Fatal(err)
7272
}
7373

74-
nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.ID, -1)
74+
nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.SHA3_256, -1)
7575
if err != nil {
7676
t.Fatal(err)
7777
}
@@ -81,7 +81,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) {
8181
t.Fatal(err)
8282
}
8383

84-
if nd.Cid().String() != "bafyqabtfjbswy3dp" {
84+
if nd.Cid().String() != "bafyrmifu7haikttpqqgc5ewvmp76z3z4ebp7h2ph4memw7dq4nt6btmxny" {
8585
t.Errorf("got wrong cid: %s", nd.Cid().String())
8686
}
8787
}

0 commit comments

Comments
 (0)