Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(a3p): extend governance test coverage for acceptance proposal (#…
…10555) closes: https://github.com/Agoric/BytePitchPartnerEng/issues/24 closes: #10708 ## Description This PR has the objective of extending the a3p-integration acceptance proposal test coverage. More specifically, it intend to test that: - Configured EC governed parameters are intact following the contract upgrade - Governance proposals history is visible The test plan to verify that the parameters governed by the economicCommittee are intact when the contract is upgraded is: - Propose a parameter change - Verify that the value was updated - Execute a null upgrade to the respective contract - Verify that the value kept the same Although more contracts are governed by economicCommittee, the ones selected to be included in this test case were `vaultFactory` and `provisionPool`. A detailed discussion on the rationale behind this decision can be found at https://github.com/Agoric/BytePitchPartnerEng/issues/24 Note: The existing governance test and helper functions were refactored to allow the `makeGovernanceDriver` function to be contract agnostic, in order to be reused by vaultFactory, provisionPool and any other contract that is intend to be tested in the future. The test plan is to verify that the vstorage node published.committees.Economic_Committee.latestQuestion displays the history of proposed Economic Committee parameter changes is: - Use the readHistory method to fetch all parameter change proposals from latestQuestion node, starting from block height 0. - Verify that returned value is not an empty list - Construct a list of expected parameters changes proposed by the economic committee prior to the governance test. - Compare the parameters keys of both lists match. ### Security Considerations No security considerations. ### Scaling Considerations The "Governance proposals history" test compares vstorage values against a hardcoded list, requiring manual updates to expectedParametersChanges for new proposals or tests that executes a EC governed param changes made prior to this test. To prevent the halting the test when the developer does not update the hardcoded list, this test is only asserting that the value returned from the published.committees.Economic_Committee.latestQuestion vstorage node is not empty. Then it will compare both lists and if any mismatches is found, it will: - print an error message notifying the mismatch. - print both current and expected changes proposals records Note that this solution may risks oversight and could lead to latent issues, so I am open a implement a new design if desired. ### Documentation Considerations We propose adding a table to the z:acceptance README file. This table will: - List the parameters being modified during acceptance test execution. - Identify where and why these changes occur, providing developers with a clear understanding of parameter dependencies. An [issue](https://github.com/Agoric/BytePitchPartnerEng/issues/43) was created to address this task. ### Testing Considerations The methods exported by `makeVstorageKit` at the `@agoric/client-utils` package, seems to display an unexpected behaviour, more specifically, when using the `readFully` method to query Vstorage node full history. As a workaround, I updated the `makeVStorage` function at `z:acceptance/test-lib/rpc.js` to follow the same implementation as the `multichain-testing/tools/batchQuery.js.` The rational behind this decision is explained in detail on the issue #10574 If desired, I can add these changes to `@client-utils/src/vstorage.js` in a future PR, contribute to the ongoing effort of reducing the dependency of the acceptance test-lib. The order of execution of the acceptance tests had to be updated to make sure that the `governance.test.js` would run after the state-sync acceptance tests to prevent the behavior described here #10574 ### Upgrade Considerations No upgrade considerations.
- Loading branch information