From 8fbb32c5d7b84dfd4e3faf2cf90857cf03e3b68f Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 3 Mar 2020 16:00:39 -0500 Subject: [PATCH] add a few more checks to the rpc tests --- scripts/tests/test-rpc.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/tests/test-rpc.js b/scripts/tests/test-rpc.js index b9dcf9284..d33dd92e2 100644 --- a/scripts/tests/test-rpc.js +++ b/scripts/tests/test-rpc.js @@ -401,11 +401,17 @@ nThen(function (w) { value: [ alice.edKeys.edPublic ] - }, w(function (err /*, metadata */) { + }, w(function (err, response) { if (err) { + throw new Error("FAIL"); return void console.error(err); } - //console.log('XXX', metadata); + + var metadata = response && response[0]; + if (!metadata || !Array.isArray(metadata.allowed) || + metadata.allowed.indexOf(alice.edKeys.edPublic) === -1) { + throw new Error("EXPECTED ALICE TO BE IN THE ALLOW LIST"); + } })); }).nThen(function (w) { oscar.anonRpc.send('GET_METADATA', oscar.mailboxChannel, w(function (err, response) {