Skip to content

Commit

Permalink
Merge branch 'main' of github.com:neutron-org/neutron-integration-tes…
Browse files Browse the repository at this point in the history
…ts into feat/add-new-voting-registry-tests
  • Loading branch information
sotnikov-s committed Sep 21, 2023
2 parents 889fca4 + 7b6ad41 commit b554ba7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
16 changes: 8 additions & 8 deletions src/testcases/parallel/governance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,47 +92,47 @@ describe('Neutron / Governance', () => {

describe('prepare: bond funds', () => {
test('bond form wallet 1', async () => {
await daoMember1.bondFunds('1000000000');
await daoMember1.bondFunds('10000');
await wait.getWithAttempts(
neutronChain.blockWaiter,
async () =>
await mainDao.queryVotingPower(
daoMember1.user.wallet.address.toString(),
),
async (response) => response.power == 1000000000,
async (response) => response.power == 10000,
20,
);
});
test('bond from wallet 2', async () => {
await daoMember2.bondFunds('1000000000');
await daoMember2.bondFunds('10000');
await wait.getWithAttempts(
neutronChain.blockWaiter,
async () =>
await mainDao.queryVotingPower(
daoMember1.user.wallet.address.toString(),
),
async (response) => response.power == 1000000000,
async (response) => response.power == 10000,
20,
);
});
test('bond from wallet 3 ', async () => {
await daoMember3.bondFunds('1000000000');
await daoMember3.bondFunds('10000');
await wait.getWithAttempts(
neutronChain.blockWaiter,
async () =>
await mainDao.queryVotingPower(
daoMember1.user.wallet.address.toString(),
),
async (response) => response.power == 1000000000,
async (response) => response.power == 10000,
20,
);
});
test('check voting power', async () => {
await wait.getWithAttempts(
neutronChain.blockWaiter,
async () => await mainDao.queryTotalVotingPower(),
// 3x1000000000 + 100000000 from investors vault (see neutron/network/init-neutrond.sh)
async (response) => response.power == 3100000000,
// 3x10000 + 1000 from investors vault (see neutron/network/init-neutrond.sh)
async (response) => response.power == 31000,
20,
);
});
Expand Down
12 changes: 4 additions & 8 deletions src/testcases/run_in_band/interchaintx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,32 +794,28 @@ describe('Neutron / Interchain TXs', () => {
expect(failures.failures).toEqual([
{
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
address: contractAddress,
id: '0',
ack_id: '2',
ack_type: 'ack',
},
{
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
address: contractAddress,
id: '1',
ack_id: '3',
ack_type: 'ack',
},
{
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
address: contractAddress,
id: '2',
ack_id: '4',
ack_type: 'ack',
},
{
channel_id: 'channel-3',
address:
'neutron1m0z0kk0qqug74n9u9ul23e28x5fszr628h20xwt6jywjpp64xn4qatgvm0',
address: contractAddress,
id: '3',
ack_id: '5',
ack_type: 'timeout',
Expand Down
7 changes: 5 additions & 2 deletions src/testcases/run_in_band/tge.auction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ describe('Neutron / TGE / Auction', () => {

it('add lockdrop vault to the registry', async () => {
let tvp = await daoMain.queryTotalVotingPower();
expect(tvp.power | 0).toBe(1000);
expect(tvp.power | 0).toBe(2000); // the bonded 1000 + 1000 from investors vault (see neutron/network/init-neutrond.sh)
const propID = await daoMember1.submitSingleChoiceProposal(
'Proposal #1',
'add LOCKDROP_VAULT',
Expand All @@ -1668,8 +1668,9 @@ describe('Neutron / TGE / Auction', () => {
);
await daoMember1.voteYes(propID);
await daoMember1.executeProposal(propID);
await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active
tvp = await daoMain.queryTotalVotingPower();
expect(tvp.power | 0).toBeGreaterThan(1000);
expect(tvp.power | 0).toBeGreaterThan(2000);
// lockdrop participants get voting power
for (const v of [
'airdropAuctionLockdrop',
Expand Down Expand Up @@ -1734,6 +1735,7 @@ describe('Neutron / TGE / Auction', () => {
}
}
await daoMember1.executeProposal(propID);
await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active
const tvpNew = await daoMain.queryTotalVotingPower();
expect(tvpNew.power | 0).toBeGreaterThan(tvp.power | 0);
// vesting participants get(increase) the voting power
Expand Down Expand Up @@ -1792,6 +1794,7 @@ describe('Neutron / TGE / Auction', () => {
}
}
await daoMember1.executeProposal(propID);
await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active
const tvpNew = await daoMain.queryTotalVotingPower();
expect(tvpNew.power | 0).toBeGreaterThan(tvp.power | 0);
// airdrop participants get(increase) the voting power
Expand Down

0 comments on commit b554ba7

Please sign in to comment.