Skip to content

Commit

Permalink
test: defer chainConnection encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jun 11, 2024
1 parent 9055740 commit a8f6c6c
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions a3p-integration/proposals/b:enable-orchestration/initial.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,25 @@ test(`vat details`, async t => {
}
});

test('chain info', async t => {
const cosmos = await agd
.query(
'vstorage',
'data',
'--output',
'json',
'published.agoricNames.chain.cosmos',
)
const queryData = path =>
agd
.query('vstorage', 'data', '--output', 'json', path)
.then(res => JSON.parse(JSON.parse(JSON.parse(res.value).values[0]).body));
console.log('chain.cosmos', cosmos);
t.like(cosmos, { chainId: 'cosmoslocal' });

const names = await agd.query(
'vstorage',
'children',
'--output',
'json',
'published.agoricNames.chain',
test('chain info', async t => {
const chain = await queryData('published.agoricNames.chain.cosmoshub');

console.log('chain.cosmoshub', chain);
t.like(chain, { chainId: 'cosmoshub-4' });
});

test.failing('chain connection', async t => {
// FIXME encoding
// message: `Command failed with exit code 1: agd query vstorage data --output json published.agoricNames.chainConnection.["agoriclocal","cosmoshub-4"] -o json␊
// Error: rpc error: code = Unknown desc = path "published.agoricNames.chainConnection.[\\"agoriclocal\\",\\"cosmoshub-4\\"]" contains invalid characters: panic␊
const connection = await queryData(
'published.agoricNames.chainConnection.["agoriclocal","cosmoshub-4"]',
);
t.deepEqual(names.children, [
'agoric',
'celestia',
'cosmos',
'osmosis',
'stride',
]);
console.log(connection);
t.like(connection, {});
});

0 comments on commit a8f6c6c

Please sign in to comment.