Browse Source

Merge pull request #1 from mnaamani/runtime-upgrade-integration-tests

Minor fixes to runtime upgrade
Martin 4 years ago
parent
commit
5692510907
3 changed files with 546 additions and 36 deletions
  1. 1 1
      .github/workflows/run-network-tests.yml
  2. 2 18
      runtime/src/runtime_api.rs
  3. 543 17
      yarn.lock

+ 1 - 1
.github/workflows/run-network-tests.yml

@@ -100,7 +100,7 @@ jobs:
       - name: Ensure tests are runnable
         run: yarn workspace network-tests build
       - name: Execute network tests
-        run: RUNTIME=alexandria tests/network-tests/run-tests.sh full
+        run: RUNTIME=babylon tests/network-tests/run-tests.sh full
 
   basic_runtime:
     name: Integration Tests (New Chain)

+ 2 - 18
runtime/src/runtime_api.rs

@@ -11,10 +11,9 @@ use sp_runtime::{generic, ApplyExtrinsicResult};
 use sp_std::vec::Vec;
 
 use crate::constants::PRIMARY_PROBABILITY;
-use crate::integration::content_directory::ContentDirectoryWorkingGroup;
 use crate::{
-    content_directory, AccountId, AuthorityDiscoveryId, Balance, BlockNumber, EpochDuration,
-    GrandpaAuthorityList, GrandpaId, Hash, Index, RuntimeVersion, Signature, VERSION,
+    AccountId, AuthorityDiscoveryId, Balance, BlockNumber, EpochDuration, GrandpaAuthorityList,
+    GrandpaId, Hash, Index, RuntimeVersion, Signature, VERSION,
 };
 use crate::{
     AllModules, AuthorityDiscovery, Babe, Call, Grandpa, Historical, InherentDataExt,
@@ -60,21 +59,6 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<AccountId, Call, Signa
 pub struct CustomOnRuntimeUpgrade;
 impl OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
     fn on_runtime_upgrade() -> Weight {
-        let default_text_constraint = crate::working_group::default_text_constraint();
-        let default_content_working_group_mint_capacity = 0;
-
-        ContentDirectoryWorkingGroup::<Runtime>::initialize_working_group(
-            default_text_constraint,
-            default_text_constraint,
-            default_text_constraint,
-            default_content_working_group_mint_capacity,
-        );
-
-        // Next Id's are configured at genesis. Applications and tools are harcoded to expect initial
-        // values of the ids to start at 1. With a runtime upgrade the initial values will not be
-        // configured and get an initial default value of zero. This corrects this problem.
-        content_directory::Module::<Runtime>::set_initial_ids_to_one();
-
         10_000_000 // TODO: adjust weight
     }
 }

File diff suppressed because it is too large
+ 543 - 17
yarn.lock


Some files were not shown because too many files changed in this diff