@cryptotaxi247 / kubo / commits / 09a4311db

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 This commit was moved from ipfs/boxo@3b9a723861fa7b8069ac6a0c698f83a8b6e82237

Steven Allen committed Aug 23, 2019 at 16:22 UTC 09a4311db7804b6d511ce99e65029bdb283b2c4d
1 file changed +2 -2
core/coreiface/tests/dag.go
+2 -2
@@ -71,7 +71,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) {
71 t.Fatal(err)
72 }
73
74 - nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.ID, -1)
74 + nd, err := ipldcbor.FromJSON(strings.NewReader(`"Hello"`), mh.SHA3_256, -1)
75 if err != nil {
76 t.Fatal(err)
77 }
@@ -81,7 +81,7 @@ func (tp *TestSuite) TestPutWithHash(t *testing.T) {
81 t.Fatal(err)
82 }
83
84 - if nd.Cid().String() != "bafyqabtfjbswy3dp" {
84 + if nd.Cid().String() != "bafyrmifu7haikttpqqgc5ewvmp76z3z4ebp7h2ph4memw7dq4nt6btmxny" {
85 t.Errorf("got wrong cid: %s", nd.Cid().String())
86 }
87 }