Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
bf04e6db
Unverified
Commit
bf04e6db
authored
11 months ago
by
Liam Aharon
Browse files
Options
Downloads
Patches
Plain Diff
wip emulated test
parent
488bcf75
No related merge requests found
Pipeline
#466255
failed with stages
in 4 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury_asset_reward_pool.rs
+14
-27
14 additions, 27 deletions
.../asset-hub-rococo/src/tests/treasury_asset_reward_pool.rs
with
14 additions
and
27 deletions
cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury_asset_reward_pool.rs
+
14
−
27
View file @
bf04e6db
...
...
@@ -14,24 +14,18 @@
// limitations under the License.
use
crate
::
imports
::
*
;
use
asset_hub_rococo_runtime
::{
xcm_config
::{
GovernanceLocation
,
RelayTreasuryLocation
},
TreasurerBodyId
,
};
use
codec
::
Encode
;
use
emulated_integration_tests_common
::
ASSET_HUB_ROCOCO_ID
;
use
frame_support
::{
assert_ok
,
sp_runtime
::
traits
::
Dispatchable
};
use
pallet_xcm
::{
EnsureXcm
,
IsVoiceOfBody
};
#[test]
fn
treasury_creates_asset_reward_pool
()
{
AssetHubRococo
::
execute_with
(||
{
type
AssetHubRococoRuntimeEvent
=
<
AssetHubRococo
as
Chain
>
::
RuntimeEvent
;
Rococo
::
execute_with
(||
{
type
AssetHubRococoRuntimeCall
=
<
AssetHubRococo
as
Chain
>
::
RuntimeCall
;
type
AssetHubRococoRuntimeOrigin
=
<
AssetHubRococo
as
Chain
>
::
RuntimeOrigin
;
type
AssetHubRococoRuntime
=
<
AssetHubRococo
as
Chain
>
::
Runtime
;
type
RococoRuntimeCall
=
<
Rococo
as
Chain
>
::
RuntimeCall
;
type
RococoRuntime
=
<
Rococo
as
Chain
>
::
Runtime
;
type
RococoRuntimeEvent
=
<
Rococo
as
Chain
>
::
RuntimeEvent
;
type
RococoRuntimeOrigin
=
<
Rococo
as
Chain
>
::
RuntimeOrigin
;
let
staked_asset_id
=
bx!
(
xcm
::
v3
::
Junction
::
PalletInstance
(
1
)
.into
());
...
...
@@ -67,26 +61,19 @@ fn treasury_creates_asset_reward_pool() {
let
treasury_origin
:
RococoRuntimeOrigin
=
rococo_runtime
::
governance
::
pallet_custom_origins
::
Origin
::
Treasurer
.into
();
// TODO: Figure out how to enable treasury origin
// assert_ok!(create_pool_call.dispatch(treasury_origin));
assert_ok!
(
create_pool_call
.dispatch
(
RococoRuntimeOrigin
::
root
()));
assert_ok!
(
create_pool_call
.dispatch
(
treasury_origin
));
assert_expected_events!
(
Rococo
,
vec!
[
RococoRuntimeEvent
::
XcmPallet
(
pallet_xcm
::
Event
::
Sent
{
..
})
=>
{},
]
);
});
// assert_expected_events!(
// CollectivesPolkadot,
// vec![
// RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {},
// ]
// );
// });
//
// Polkadot::execute_with(|| {
// type RuntimeEvent = <Polkadot as Chain>::RuntimeEvent;
//
// assert_expected_events!(
// Polkadot,
// vec![
// RuntimeEvent::Whitelist(pallet_whitelist::Event::CallWhitelisted { .. }) => {},
// RuntimeEvent::MessageQueue(pallet_message_queue::Event::Processed { success: true, .. })
// => {}, ]
// );
AssetHubRococo
::
execute_with
(||
{
// TODO: Check that the pool was created
});
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment