|
@@ -12,7 +12,8 @@ use working_group::{OpeningPolicyCommitment, RewardPolicy};
|
|
|
|
|
|
use crate::{
|
|
|
Balance, BlockNumber, ContentDirectoryWorkingGroup, ContentDirectoryWorkingGroupInstance,
|
|
|
- StorageWorkingGroup, StorageWorkingGroupInstance,
|
|
|
+ DistributionWorkingGroup, DistributionWorkingGroupInstance, StorageWorkingGroup,
|
|
|
+ StorageWorkingGroupInstance,
|
|
|
};
|
|
|
use sp_std::collections::btree_set::BTreeSet;
|
|
|
|
|
@@ -52,6 +53,14 @@ fn add_opening(
|
|
|
>>::contains_key(opening_id));
|
|
|
opening_id
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ let opening_id = DistributionWorkingGroup::next_opening_id();
|
|
|
+ assert!(!<working_group::OpeningById<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >>::contains_key(opening_id));
|
|
|
+ opening_id
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
let codex_extrinsic_test_fixture = CodexProposalTestFixture::default_for_call(|| {
|
|
@@ -330,6 +339,12 @@ fn create_add_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_add_working_group_leader_opening_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -388,6 +403,12 @@ fn create_begin_review_working_group_leader_applications_proposal_execution_succ
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_begin_review_working_group_leader_applications_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -468,6 +489,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_fill_working_group_leader_opening_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -545,6 +572,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_decrease_group_leader_stake_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -662,6 +695,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group)
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_slash_group_leader_stake_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -780,6 +819,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_set_working_group_mint_capacity_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -836,6 +881,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_set_working_group_mint_capacity_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -959,6 +1010,12 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
StorageWorkingGroupInstance,
|
|
|
>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_terminate_group_leader_role_proposal_execution_succeeds::<
|
|
|
+ Runtime,
|
|
|
+ DistributionWorkingGroupInstance,
|
|
|
+ >(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1078,6 +1135,9 @@ fn create_fill_working_group_leader_opening_proposal_execution_succeeds() {
|
|
|
WorkingGroup::Storage => {
|
|
|
run_create_terminate_group_leader_role_proposal_with_slashing_execution_succeeds::<Runtime, StorageWorkingGroupInstance>(group);
|
|
|
}
|
|
|
+ WorkingGroup::Distribution => {
|
|
|
+ run_create_terminate_group_leader_role_proposal_with_slashing_execution_succeeds::<Runtime, DistributionWorkingGroupInstance>(group);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|