From a4647455be3510eaa843f80914827db634d8383b Mon Sep 17 00:00:00 2001 From: fly33499 Date: Mon, 18 Oct 2021 21:31:57 +0900 Subject: [PATCH] testcase: update gov tx for cancelsoftwareupgrade --- test/16.gov_tx.test.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test/16.gov_tx.test.ts b/test/16.gov_tx.test.ts index dee2026..ea27d97 100644 --- a/test/16.gov_tx.test.ts +++ b/test/16.gov_tx.test.ts @@ -74,7 +74,7 @@ describe.skip('[16. Gov Tx Test]', () => { const aliceWallet = await firma.Wallet.fromMnemonic(aliceMnemonic); const proposer = await aliceWallet.getAddress(); - const initialDepositFCT = 1000; + const initialDepositFCT = 10000; const title = "Software Upgrade proposal1"; const description = "This is a software upgrade proposal"; @@ -83,10 +83,24 @@ describe.skip('[16. Gov Tx Test]', () => { var result = await firma.Gov.submitSoftwareUpgradeProposalByHeight(aliceWallet, title, description, initialDepositFCT, proposer, upgradeName, upgradeHeight); - //console.log(result); + console.log(result); expect(result.code).to.equal(0); }); + it('SubmitCancelSoftwareUpgradeProposal Test', async () => { + + const aliceWallet = await firma.Wallet.fromMnemonic(aliceMnemonic); + + const proposer = await aliceWallet.getAddress(); + const initialDepositFCT = 1000; + const title = "Software Upgrade proposal1"; + const description = "This is a software upgrade proposal"; + + var result = await firma.Gov.submitCancelSoftwareUpgradeProposal(aliceWallet, title, description, initialDepositFCT, proposer); + + console.log(result); + expect(result.code).to.equal(0); + }); // NOTICE: time-based upgrades have been deprecated in the SDK: invalid request /*it.skip('SubmitSoftwareUpgradeProposalByTime Test', async () => {