Skip to content
8 changes: 8 additions & 0 deletions .github/workflows/integration-tests-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@
{
"name": "collectives-polkadot",
"package": "collectives-polkadot-integration-tests"
},
{
"name": "coretime-kusama",
"package": "coretime-kusama-integration-tests"
},
{
"name": "coretime-polkadot",
"package": "coretime-polkadot-integration-tests"
}
]
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- [[#711](https://github.com/polkadot-fellows/runtimes/pull/711)] Only allow apply slash to be executed if the slash amount is atleast ED ([SDK stable2503 #6540](https://github.com/paritytech/polkadot-sdk/pull/6540)).
- [[#711](https://github.com/polkadot-fellows/runtimes/pull/711)] Paras-registrar: Improve error reporting ([SDK stable2503 #6989](https://github.com/paritytech/polkadot-sdk/pull/6989)).
- [[#711](https://github.com/polkadot-fellows/runtimes/pull/711)] Xcm: convert properly assets in xcmpayment apis ([SDK stable2503 #7134](https://github.com/paritytech/polkadot-sdk/pull/7134)).
- [[#711](https://github.com/polkadot-fellows/runtimes/pull/711)] Ensure Consistent Topic IDs for Traceable Cross-Chain XCM ([SDK stable2503 #7691](https://github.com/paritytech/polkadot-sdk/pull/7691)).

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use crate::*;
use frame_support::traits::OnInitialize;
use kusama_runtime::Dmp;
use kusama_runtime_constants::system_parachain::coretime::TIMESLICE_PERIOD;
use pallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
use sp_runtime::Perbill;
Expand All @@ -34,6 +35,10 @@ fn transact_hardcoded_weights_are_sane() {
type CoretimeEvent = <CoretimeKusama as Chain>::RuntimeEvent;
type RelayEvent = <Kusama as Chain>::RuntimeEvent;

Kusama::execute_with(|| {
Dmp::make_parachain_reachable(CoretimeKusama::para_id());
});

// Reserve a workload, configure broker and start sales.
CoretimeKusama::execute_with(|| {
// Hooks don't run in emulated tests - workaround as we need `on_initialize` to tick things
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use crate::*;
use frame_support::traits::OnInitialize;
use pallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
use polkadot_runtime::Dmp;
use polkadot_runtime_constants::system_parachain::coretime::TIMESLICE_PERIOD;
use sp_runtime::Perbill;

Expand All @@ -34,6 +35,10 @@ fn transact_hardcoded_weights_are_sane() {
type CoretimeEvent = <CoretimePolkadot as Chain>::RuntimeEvent;
type RelayEvent = <Polkadot as Chain>::RuntimeEvent;

Polkadot::execute_with(|| {
Dmp::make_parachain_reachable(CoretimePolkadot::para_id());
});

// Reserve a workload, configure broker and start sales.
CoretimePolkadot::execute_with(|| {
// Hooks don't run in emulated tests - workaround as we need `on_initialize` to tick things
Expand Down
10 changes: 6 additions & 4 deletions system-parachains/coretime/coretime-kusama/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ fn bulk_revenue_is_burnt() {
renewal_bump: Perbill::from_percent(3),
contribution_timeout: 1,
};
let ed = ExistentialDeposit::get();
assert_ok!(Broker::configure(RuntimeOrigin::root(), config.clone()));
assert_ok!(Broker::start_sales(RuntimeOrigin::root(), ed, 1));
assert_ok!(Broker::start_sales(RuntimeOrigin::root(), UNITS, 1));

let sale_start = SaleInfo::<Runtime>::get().unwrap().sale_start;
advance_to(sale_start + config.interlude_length);
Expand All @@ -96,14 +95,17 @@ fn bulk_revenue_is_burnt() {
let broker_account = BrokerPalletId::get().into_account_truncating();
let coretime_burn_account = CoretimeBurnAccount::get();
let treasury_account = xcm_config::RelayTreasuryPalletAccount::get();
assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * ed));
assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * UNITS));
let alice_balance_before = Balances::balance(&AccountId::from(ALICE));
let treasury_balance_before = Balances::balance(&treasury_account);
let broker_balance_before = Balances::balance(&broker_account);
let burn_balance_before = Balances::balance(&coretime_burn_account);

// Purchase coretime.
assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 100 * ed));
assert_ok!(Broker::purchase(
RuntimeOrigin::signed(AccountId::from(ALICE)),
100 * UNITS
));

// Alice decreases.
assert!(Balances::balance(&AccountId::from(ALICE)) < alice_balance_before);
Expand Down
10 changes: 6 additions & 4 deletions system-parachains/coretime/coretime-polkadot/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ fn bulk_revenue_is_burnt() {
renewal_bump: Perbill::from_percent(3),
contribution_timeout: 1,
};
let ed = ExistentialDeposit::get();
assert_ok!(Broker::configure(RuntimeOrigin::root(), config.clone()));
assert_ok!(Broker::start_sales(RuntimeOrigin::root(), ed, 1));
assert_ok!(Broker::start_sales(RuntimeOrigin::root(), UNITS, 1));

let sale_start = SaleInfo::<Runtime>::get().unwrap().sale_start;
advance_to(sale_start + config.interlude_length);
Expand All @@ -96,14 +95,17 @@ fn bulk_revenue_is_burnt() {
let broker_account = BrokerPalletId::get().into_account_truncating();
let coretime_burn_account = CoretimeBurnAccount::get();
let treasury_account = xcm_config::RelayTreasuryPalletAccount::get();
assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * ed));
assert_ok!(Balances::mint_into(&AccountId::from(ALICE), 200 * UNITS));
let alice_balance_before = Balances::balance(&AccountId::from(ALICE));
let treasury_balance_before = Balances::balance(&treasury_account);
let broker_balance_before = Balances::balance(&broker_account);
let burn_balance_before = Balances::balance(&coretime_burn_account);

// Purchase coretime.
assert_ok!(Broker::purchase(RuntimeOrigin::signed(AccountId::from(ALICE)), 100 * ed));
assert_ok!(Broker::purchase(
RuntimeOrigin::signed(AccountId::from(ALICE)),
100 * UNITS
));

// Alice decreases.
assert!(Balances::balance(&AccountId::from(ALICE)) < alice_balance_before);
Expand Down
Loading