From 50aba5263ea20e06d9f766faa6fa7e4c499ea4de Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Fri, 27 Oct 2023 16:49:05 +0200 Subject: [PATCH] test: adjusted msg_server_vote_bundle_proposal_test.go in bundles module --- .../msg_server_vote_bundle_proposal_test.go | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go b/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go index dabcfe29..9db0c936 100644 --- a/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go +++ b/x/bundles/keeper/msg_server_vote_bundle_proposal_test.go @@ -14,9 +14,6 @@ import ( TEST CASES - msg_server_vote_bundle_proposal.go -* Try to vote valid as the only voter on bundle proposal -* Try to vote invalid as the only voter on bundle proposal -* Try to vote abstain as the only voter on bundle proposal * Try to vote abstain on proposal again * Try to vote valid on proposal after abstain vote * Try to vote invalid on proposal after abstain vote @@ -90,77 +87,12 @@ var _ = Describe("msg_server_vote_bundle_proposal.go", Ordered, func() { ToKey: "99", BundleSummary: "test_value", }) - - s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ - Creator: i.STAKER_1, - Amount: 100 * i.KYVE, - }) - - s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ - Creator: i.STAKER_1, - PoolId: 0, - Valaddress: i.VALADDRESS_1_A, - }) }) AfterEach(func() { s.PerformValidityChecks() }) - It("Try to vote valid as the only voter on bundle proposal", func() { - // ACT - s.RunTxBundlesSuccess(&bundletypes.MsgVoteBundleProposal{ - Creator: i.VALADDRESS_1_A, - Staker: i.STAKER_1, - PoolId: 0, - StorageId: "y62A3tfbSNcNYDGoL-eXwzyV-Zc9Q0OVtDvR1biJmNI", - Vote: bundletypes.VOTE_TYPE_VALID, - }) - - // ASSERT - bundleProposal, _ := s.App().BundlesKeeper.GetBundleProposal(s.Ctx(), 0) - - Expect(bundleProposal.VotersValid).To(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersInvalid).NotTo(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersAbstain).NotTo(ContainElement(i.STAKER_1)) - }) - - It("Try to vote invalid as the only voter on bundle proposal", func() { - // ACT - s.RunTxBundlesSuccess(&bundletypes.MsgVoteBundleProposal{ - Creator: i.VALADDRESS_1_A, - Staker: i.STAKER_1, - PoolId: 0, - StorageId: "y62A3tfbSNcNYDGoL-eXwzyV-Zc9Q0OVtDvR1biJmNI", - Vote: bundletypes.VOTE_TYPE_INVALID, - }) - - // ASSERT - bundleProposal, _ := s.App().BundlesKeeper.GetBundleProposal(s.Ctx(), 0) - - Expect(bundleProposal.VotersValid).NotTo(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersInvalid).To(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersAbstain).NotTo(ContainElement(i.STAKER_1)) - }) - - It("Try to vote abstain as the only voter on bundle proposal", func() { - // ACT - s.RunTxBundlesSuccess(&bundletypes.MsgVoteBundleProposal{ - Creator: i.VALADDRESS_1_A, - Staker: i.STAKER_1, - PoolId: 0, - StorageId: "y62A3tfbSNcNYDGoL-eXwzyV-Zc9Q0OVtDvR1biJmNI", - Vote: bundletypes.VOTE_TYPE_ABSTAIN, - }) - - // ASSERT - bundleProposal, _ := s.App().BundlesKeeper.GetBundleProposal(s.Ctx(), 0) - - Expect(bundleProposal.VotersValid).NotTo(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersInvalid).NotTo(ContainElement(i.STAKER_1)) - Expect(bundleProposal.VotersAbstain).To(ContainElement(i.STAKER_1)) - }) - It("Try to vote abstain on proposal again", func() { // ARRANGE s.RunTxBundlesSuccess(&bundletypes.MsgVoteBundleProposal{