From d1c497bf2fe41abd1bb1080401164ca31d0983e5 Mon Sep 17 00:00:00 2001 From: Daniel Norman <1992255+2color@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:58:26 +0100 Subject: [PATCH] test: test ipns ttl interop (#476) Co-authored-by: Daniel N <2color@users.noreply.github.com> --- packages/interop/src/ipns.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/interop/src/ipns.spec.ts b/packages/interop/src/ipns.spec.ts index 8fa1e3316..0dc744770 100644 --- a/packages/interop/src/ipns.spec.ts +++ b/packages/interop/src/ipns.spec.ts @@ -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) }) }) })