mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 19:27:58 +00:00
Fix: CI failing for some CLI tests (#5043)
* Initial commit
Forked at: ad90ab7ec9
Parent branch: origin/master
* Increase killing grace period of CLI tests and display more info
* Use --dev everywhere possible
* Put pruning mode to its own params struct
* Add pruning params to export-blocks command
* Added missing file
* Removed not-dev mode in tests
* Add pruning mode to the revert command
* Decrease killing grace period again
* Move back unsafe_pruning to import_params
* Applied proposed changes
This commit is contained in:
@@ -22,15 +22,14 @@ use log::info;
|
||||
use structopt::StructOpt;
|
||||
use sc_service::{
|
||||
Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec,
|
||||
config::DatabaseConfig,
|
||||
config::DatabaseConfig, Roles,
|
||||
};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
|
||||
|
||||
use crate::error;
|
||||
use crate::VersionInfo;
|
||||
use crate::runtime::run_until_exit;
|
||||
use crate::params::SharedParams;
|
||||
use crate::params::BlockNumber;
|
||||
use crate::params::{SharedParams, BlockNumber, PruningParams};
|
||||
|
||||
/// The `export-blocks` command used to export blocks.
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
@@ -58,6 +57,10 @@ pub struct ExportBlocksCmd {
|
||||
#[allow(missing_docs)]
|
||||
#[structopt(flatten)]
|
||||
pub shared_params: SharedParams,
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[structopt(flatten)]
|
||||
pub pruning_params: PruningParams,
|
||||
}
|
||||
|
||||
impl ExportBlocksCmd {
|
||||
@@ -106,6 +109,7 @@ impl ExportBlocksCmd {
|
||||
F: FnOnce(&str) -> Result<Option<ChainSpec<G, E>>, String>,
|
||||
{
|
||||
self.shared_params.update_config(&mut config, spec_factory, version)?;
|
||||
self.pruning_params.update_config(&mut config, Roles::FULL, true)?;
|
||||
config.use_in_memory_keystore()?;
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -17,14 +17,13 @@
|
||||
use std::fmt::Debug;
|
||||
use structopt::StructOpt;
|
||||
use sc_service::{
|
||||
Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec,
|
||||
Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, Roles,
|
||||
};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
|
||||
|
||||
use crate::error;
|
||||
use crate::VersionInfo;
|
||||
use crate::params::BlockNumber;
|
||||
use crate::params::SharedParams;
|
||||
use crate::params::{BlockNumber, SharedParams, PruningParams};
|
||||
|
||||
/// The `revert` command used revert the chain to a previous state.
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
@@ -36,6 +35,10 @@ pub struct RevertCmd {
|
||||
#[allow(missing_docs)]
|
||||
#[structopt(flatten)]
|
||||
pub shared_params: SharedParams,
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[structopt(flatten)]
|
||||
pub pruning_params: PruningParams,
|
||||
}
|
||||
|
||||
impl RevertCmd {
|
||||
@@ -72,6 +75,7 @@ impl RevertCmd {
|
||||
F: FnOnce(&str) -> Result<Option<ChainSpec<G, E>>, String>,
|
||||
{
|
||||
self.shared_params.update_config(&mut config, spec_factory, version)?;
|
||||
self.pruning_params.update_config(&mut config, Roles::FULL, true)?;
|
||||
config.use_in_memory_keystore()?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user