From 297353f123b5332f466f93bb4422cfac0e381e31 Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Tue, 24 Jan 2023 11:02:42 +0530 Subject: [PATCH] fix query record --- src/nameservice-expiry.test.ts | 6 +++--- src/testing/data/watcher.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nameservice-expiry.test.ts b/src/nameservice-expiry.test.ts index a52ab3b..7d02ca3 100644 --- a/src/nameservice-expiry.test.ts +++ b/src/nameservice-expiry.test.ts @@ -40,7 +40,7 @@ const nameserviceExpiryTests = () => { fee ) - const [record] = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true); + const [record] = await registry.queryRecords({ type: watcher.record.type, version: watcher.record.version }, true); recordExpiryTime = new Date(record.expiryTime); const [bond] = await registry.getBondsByIds([bondId]); @@ -63,7 +63,7 @@ const nameserviceExpiryTests = () => { }); test('Check record expiry time', async() => { - const [record] = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true); + const [record] = await registry.queryRecords({ type: watcher.record.type, version: watcher.record.version }, true); const updatedExpiryTime = new Date(record.expiryTime); expect(updatedExpiryTime.getTime()).toBeGreaterThan(recordExpiryTime.getTime()); recordExpiryTime = updatedExpiryTime; @@ -87,7 +87,7 @@ const nameserviceExpiryTests = () => { }); test('Check record deleted without bond balance', async() => { - const records = await registry.queryRecords({ type: 'watcher', version: watcher.record.version }, true); + const records = await registry.queryRecords({ type: watcher.record.type, version: watcher.record.version }, true); expect(records).toHaveLength(0); }) diff --git a/src/testing/data/watcher.yml b/src/testing/data/watcher.yml index 8062327..73a249b 100644 --- a/src/testing/data/watcher.yml +++ b/src/testing/data/watcher.yml @@ -4,4 +4,4 @@ record: repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR - version: 1.0.17 + version: 1.0.18