Configurable update tracks to help testing.

This commit is contained in:
Gav Wood
2016-12-15 18:51:59 +01:00
parent fa319ff64c
commit 4a2b418fc2
8 changed files with 67 additions and 26 deletions

View File

@@ -3,6 +3,7 @@ mode = "last"
mode_timeout = 300
mode_alarm = 3600
auto_update = "critical"
releases_track = "current"
no_download = false
no_consensus = false

View File

@@ -86,6 +86,7 @@ usage! {
flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(),
flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(),
flag_auto_update: String = "critical", or |c: &Config| otry!(c.parity).auto_update.clone(),
flag_releases_track: String = "current", or |c: &Config| otry!(c.parity).releases_track.clone(),
flag_no_download: bool = false, or |c: &Config| otry!(c.parity).no_download.clone(),
flag_no_consensus: bool = false, or |c: &Config| otry!(c.parity).no_consensus.clone(),
flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(),
@@ -313,6 +314,7 @@ struct Operating {
mode_timeout: Option<u64>,
mode_alarm: Option<u64>,
auto_update: Option<String>,
releases_track: Option<String>,
no_download: Option<bool>,
no_consensus: Option<bool>,
chain: Option<String>,
@@ -540,6 +542,7 @@ mod tests {
flag_mode_timeout: 300u64,
flag_mode_alarm: 3600u64,
flag_auto_update: "critical".into(),
flag_releases_track: "current".into(),
flag_no_download: false,
flag_no_consensus: false,
flag_chain: "xyz".into(),
@@ -717,6 +720,7 @@ mod tests {
mode_timeout: Some(15u64),
mode_alarm: Some(10u64),
auto_update: None,
releases_track: None,
no_download: None,
no_consensus: None,
chain: Some("./chain.json".into()),

View File

@@ -34,12 +34,19 @@ Operating Options:
--mode-alarm SECS Specify the number of seconds before auto sleep
reawake timeout occurs when mode is passive
(default: {flag_mode_alarm}).
--auto-update TRACK Set a release track to automatically update and
--auto-update SET Set a releases set to automatically update and
install.
all - All updates in the current release track.
all - All updates in the our release track.
critical - Only consensus/security updates.
none - No updates will be auto-installed.
(default: {flag_auto_update}).
--releases-track TRACK Set which release track we should use for updates.
stable - Stable releases.
beta - Beta releases.
nightly - Nightly releases (unstable).
testing - Testing releases (do not use).
current - Whatever track this executable was
released on (default: {flag_releases_track}).
--no-download Normally new releases will be downloaded ready for
updating. This disables it. Not recommended.
(default: {flag_no_download}).
@@ -47,7 +54,7 @@ Operating Options:
issues regarding consensus. Not recommended.
(default: {flag_no_consensus}).
--force-direct Run the originally installed version of Parity,
ignoring any updates that have since been installed.
ignoring any updates that have since been installed.
--chain CHAIN Specify the blockchain type. CHAIN may be either a
JSON chain specification file or olympic, frontier,
homestead, mainnet, morden, ropsten, classic, expanse,