8000 fix(qualifier): adding missing ensurings by NikolaMilosa · Pull Request #691 · dfinity/dre · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(qualifier): adding missing ensurings #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rs/qualifier/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ impl Args {
.ok_or(anyhow::anyhow!("No home dir present"))?
.join(PathBuf::from_str(XNET_TESTING_IDENTITY_PATH)?);
match path.exists() {
true => Ok(()),
true => {
let metadata = path.metadata()?;
match metadata.len() {
0 => anyhow::bail!("Xnet-testing identity is present on path {} but is empty", path.display()),
_ => Ok(()),
}
}
false => anyhow::bail!("Missing xnet-testing identity on path: {}", path.display()),
}
}
Expand Down
3 changes: 3 additions & 0 deletions rs/qualifier/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ async fn main() -> anyhow::Result<()> {
.map_err(|e| anyhow::anyhow!("Checking connectivity failed: {}", e.to_string()))?;

let args = Args::parse();
if args.version_to_qualify.is_empty() {
anyhow::bail!("Version to qualify is required, but empty string is passed.");
}
info!("Running qualification for {}", args.version_to_qualify);
info!("Generating keys for farm testnets...");
let (neuron_id, private_key_pem) = args.ensure_test_key()?;
Expand Down
Loading
0