diff --git a/a3p-integration/proposals/z:acceptance/test.sh b/a3p-integration/proposals/z:acceptance/test.sh index 906bb57262e..7e94deae29f 100755 --- a/a3p-integration/proposals/z:acceptance/test.sh +++ b/a3p-integration/proposals/z:acceptance/test.sh @@ -4,6 +4,11 @@ set -ueo pipefail # Place here any test that should be executed using the executed proposal. # The effects of this step are not persisted in further proposal layers. +# test readFully method +# XXX to be removed +echo ACCEPTANCE TESTING vstorage +yarn ava vstorage.test.js + # test the state right after the previous proposals yarn ava initial.test.js diff --git a/a3p-integration/proposals/z:acceptance/vstorage.test.js b/a3p-integration/proposals/z:acceptance/vstorage.test.js new file mode 100644 index 00000000000..e72a9cac6d8 --- /dev/null +++ b/a3p-integration/proposals/z:acceptance/vstorage.test.js @@ -0,0 +1,21 @@ +/* global fetch */ + +import test from 'ava'; +import { makeVStorage } from '@agoric/client-utils'; +import { networkConfig } from './test-lib/index.js'; + +test('readFully should vstorage node history', async t => { + const vstorage = makeVStorage({ fetch }, networkConfig); + const { readLatest, readAt, readFully } = vstorage; + + // this test was executed with different nodes and the same behavior was observed + const nodePath = 'published.committees.Economic_Committee.latestQuestion'; + + console.log('readLatest: ', await readLatest(nodePath)); + console.log('readLatest: ', await readAt(nodePath)); + + // Return a rejected promise + console.log('readLatest: ', await readFully(nodePath)); + + t.pass(); +});