@cryptotaxi247 / kubo / commits / c22cfbbf7

add test case for /ipns/QmId...

License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Aug 15, 2018 at 16:33 UTC c22cfbbf755a5138583cd208abb43a1481ae7e06
1 file changed +11 -1
fuse/ipns/ipns_test.go
+11 -1
@@ -168,7 +168,7 @@ func TestIpnsBasicIO(t *testing.T) {
168 if testing.Short() {
169 t.SkipNow()
170 }
171 - _, mnt := setupIpnsTest(t, nil)
171 + nd, mnt := setupIpnsTest(t, nil)
172 defer closeMount(mnt)
173
174 fname := mnt.Dir + "/local/testfile"
@@ -182,6 +182,16 @@ func TestIpnsBasicIO(t *testing.T) {
182 if !bytes.Equal(rbuf, data) {
183 t.Fatal("Incorrect Read!")
184 }
185 +
186 + fname2 := mnt.Dir + "/" + nd.Identity.Pretty() + "/testfile"
187 + rbuf, err = ioutil.ReadFile(fname2)
188 + if err != nil {
189 + t.Fatal(err)
190 + }
191 +
192 + if !bytes.Equal(rbuf, data) {
193 + t.Fatal("Incorrect Read!")
194 + }
195 }
196
197 // Test to make sure file changes persist over mounts of ipns