Add testing for beacon node and validator client CLI flags (#2311)

## Issue Addressed

N/A

## Proposed Changes

Add unit tests for the various CLI flags associated with the beacon node and validator client. These changes require the addition of two new flags: `dump-config` and `immediate-shutdown`.

## Additional Info

Both `dump-config` and `immediate-shutdown` are marked as hidden since they should only be used in testing and other advanced use cases.
**Note:** This requires changing `main.rs` so that the flags can adjust the program behavior as necessary.

Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
Mac L
2021-05-06 00:36:22 +00:00
parent 4cc613d644
commit bacc38c3da
16 changed files with 1327 additions and 47 deletions

View File

@@ -21,6 +21,7 @@ use state_processing::{
BlockProcessingError, SlotProcessingError,
};
use std::time::Duration;
use task_executor::ShutdownReason;
use types::*;
macro_rules! easy_from_to {
@@ -96,7 +97,7 @@ pub enum BeaconChainError {
head_block_epoch: Epoch,
},
WeakSubjectivtyVerificationFailure,
WeakSubjectivtyShutdownError(TrySendError<&'static str>),
WeakSubjectivtyShutdownError(TrySendError<ShutdownReason>),
AttestingPriorToHead {
head_slot: Slot,
request_slot: Slot,