Skip to content

Commit

Permalink
test: test ipns ttl interop (#476)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel N <2color@users.noreply.github.com>
  • Loading branch information
2color and 2color authored Mar 27, 2024
1 parent 7d27af9 commit d1c497b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/interop/src/ipns.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,16 @@ keyTypes.forEach(type => {

expect(response).to.have.property('status', 200)

const oneHourNS = BigInt(60 * 60 * 1e+9)

await kubo.api.name.publish(cid, {
key: keyName
key: keyName,
ttl: '1h'
})

const { cid: resolvedCid } = await name.resolve(key)
const { cid: resolvedCid, record } = await name.resolve(key)
expect(resolvedCid.toString()).to.equal(cid.toString())
expect(record.ttl).to.equal(oneHourNS)
})
})
})

0 comments on commit d1c497b

Please sign in to comment.