mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-25 23:21:54 +08:00
add test case for /ipns/QmId...
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -168,7 +168,7 @@ func TestIpnsBasicIO(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
}
|
||||
_, mnt := setupIpnsTest(t, nil)
|
||||
nd, mnt := setupIpnsTest(t, nil)
|
||||
defer closeMount(mnt)
|
||||
|
||||
fname := mnt.Dir + "/local/testfile"
|
||||
@ -182,6 +182,16 @@ func TestIpnsBasicIO(t *testing.T) {
|
||||
if !bytes.Equal(rbuf, data) {
|
||||
t.Fatal("Incorrect Read!")
|
||||
}
|
||||
|
||||
fname2 := mnt.Dir + "/" + nd.Identity.Pretty() + "/testfile"
|
||||
rbuf, err = ioutil.ReadFile(fname2)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(rbuf, data) {
|
||||
t.Fatal("Incorrect Read!")
|
||||
}
|
||||
}
|
||||
|
||||
// Test to make sure file changes persist over mounts of ipns
|
||||
|
Reference in New Issue
Block a user