diff --git a/x/bundles/keeper/msg_server_claim_uploader_role_test.go b/x/bundles/keeper/msg_server_claim_uploader_role_test.go index 7fa98577..ea2f9d08 100644 --- a/x/bundles/keeper/msg_server_claim_uploader_role_test.go +++ b/x/bundles/keeper/msg_server_claim_uploader_role_test.go @@ -39,14 +39,7 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { }, UpgradePlan: &pooltypes.UpgradePlan{}, }) - }) - - AfterEach(func() { - s.PerformValidityChecks() - }) - It("Try to claim uploader role without pool being funded", func() { - // ARRANGE s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ Creator: i.STAKER_0, Amount: 100 * i.KYVE, @@ -58,6 +51,25 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { Valaddress: i.VALADDRESS_0_A, }) + 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 claim uploader role without pool being funded", func() { + // ARRANGE + // ACT s.RunTxBundlesSuccess(&bundletypes.MsgClaimUploaderRole{ Creator: i.VALADDRESS_0_A, @@ -80,8 +92,8 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { // ACT s.RunTxBundlesError(&bundletypes.MsgClaimUploaderRole{ - Creator: i.VALADDRESS_0_A, - Staker: i.STAKER_0, + Creator: i.VALADDRESS_2_A, + Staker: i.STAKER_2, PoolId: 0, }) @@ -98,17 +110,6 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { Amount: 100 * i.KYVE, }) - s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ - Creator: i.STAKER_0, - Amount: 100 * i.KYVE, - }) - - s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ - Creator: i.STAKER_0, - PoolId: 0, - Valaddress: i.VALADDRESS_0_A, - }) - // ACT s.RunTxBundlesSuccess(&bundletypes.MsgClaimUploaderRole{ Creator: i.VALADDRESS_0_A, @@ -144,17 +145,6 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { Amount: 100 * i.KYVE, }) - s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ - Creator: i.STAKER_0, - Amount: 100 * i.KYVE, - }) - - s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ - Creator: i.STAKER_0, - PoolId: 0, - Valaddress: i.VALADDRESS_0_A, - }) - // ACT s.RunTxBundlesError(&bundletypes.MsgClaimUploaderRole{ Creator: i.VALADDRESS_1_A, @@ -185,20 +175,15 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { UpgradePlan: &pooltypes.UpgradePlan{}, }) - s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ - Creator: i.STAKER_0, - Amount: 100 * i.KYVE, - }) - s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ Creator: i.STAKER_0, PoolId: 1, - Valaddress: i.VALADDRESS_0_A, + Valaddress: i.VALADDRESS_0_B, }) // ACT s.RunTxBundlesError(&bundletypes.MsgClaimUploaderRole{ - Creator: i.VALADDRESS_0_A, + Creator: i.VALADDRESS_0_B, Staker: i.STAKER_0, PoolId: 0, }) @@ -216,28 +201,6 @@ var _ = Describe("msg_server_claim_uploader_role.go", Ordered, func() { Amount: 100 * i.KYVE, }) - s.RunTxStakersSuccess(&stakertypes.MsgCreateStaker{ - Creator: i.STAKER_0, - Amount: 100 * i.KYVE, - }) - - s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{ - Creator: i.STAKER_0, - PoolId: 0, - Valaddress: i.VALADDRESS_0_A, - }) - - 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, - }) - s.RunTxBundlesSuccess(&bundletypes.MsgClaimUploaderRole{ Creator: i.VALADDRESS_0_A, Staker: i.STAKER_0,