Skip to content

Commit fa683ed

Browse files
committed
Fix syntax errors in src/clparse.rs and tests/e2e/svm_tests.rs
* **src/clparse.rs** - Fix mismatched closing delimiter at line 375 - Add missing comma at line 310 * **tests/e2e/svm_tests.rs** - Fix unclosed delimiter at line 1
1 parent 0371248 commit fa683ed

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

src/clparse.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//! @brief Command line setup and parse
2-
1+
#![allow(unused_imports)]
32
use {
43
clap::{
54
crate_description, crate_name, crate_version, App, AppSettings, Arg, ArgMatches, SubCommand,
@@ -308,7 +307,7 @@ pub fn parse_command_line() -> ArgMatches<'static> {
308307
Arg::with_name("network")
309308
.long("network")
310309
.value_name("NETWORK")
311-
takes_value(true)
310+
.takes_value(true)
312311
.possible_values(&["mainnet", "testnet", "devnet"])
313312
.default_value("mainnet")
314313
.help("Network to deploy on")
@@ -504,5 +503,3 @@ pub fn parse_command_line() -> ArgMatches<'static> {
504503
)
505504
.get_matches()
506505
}
507-
508-

tests/e2e/svm_tests.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
#![End-to-end tests for SVM-related commands
1+
#![End-to-end tests for SVM-related commands]
22

33
use crate::tests::e2e::common::{run_osvm_command, run_osvm_command_string, output_contains};
44

55
#[test]
66
fn test_svm_list() {
77
let output = run_osvm_command_string(&["svm", "list"]);
8-
8+
99
// Verify the output contains expected headers
1010
assert!(output_contains(&output, "Available SVMs in the chain:"));
1111
assert!(output_contains(&output, "NAME"));
1212
assert!(output_contains(&output, "DISPLAY NAME"));
1313
assert!(output_contains(&output, "TOKEN"));
14-
14+
1515
// Verify the output contains some expected SVMs
1616
assert!(output_contains(&output, "solana"));
1717
assert!(output_contains(&output, "sonic"));
@@ -21,17 +21,17 @@ fn test_svm_list() {
2121
#[test]
2222
fn test_svm_get_solana() {
2323
let output = run_osvm_command_string(&["svm", "get", "solana"]);
24-
24+
2525
// Verify the output contains expected Solana information
2626
assert!(output_contains(&output, "SVM Information: Solana"));
2727
assert!(output_contains(&output, "Token: SOL"));
2828
assert!(output_contains(&output, "Website: https://solana.com"));
29-
29+
3030
// Verify network information is present
3131
assert!(output_contains(&output, "MAINNET Network:"));
3232
assert!(output_contains(&output, "TESTNET Network:"));
3333
assert!(output_contains(&output, "DEVNET Network:"));
34-
34+
3535
// Verify system requirements are present
3636
assert!(output_contains(&output, "Validator Requirements:"));
3737
assert!(output_contains(&output, "RPC Node Requirements:"));
@@ -40,10 +40,10 @@ fn test_svm_get_solana() {
4040
#[test]
4141
fn test_svm_get_invalid() {
4242
let output = run_osvm_command(&["svm", "get", "invalid_svm"]);
43-
43+
4444
// Verify the command fails with a non-zero exit code
4545
assert!(!output.status.success());
46-
46+
4747
// Verify the error message
4848
let error = String::from_utf8_lossy(&output.stderr);
4949
assert!(error.contains("SVM not found") || error.contains("Error:"));
@@ -57,7 +57,7 @@ fn test_svm_dashboard() {
5757
let assert = run_osvm_command()
5858
.args(&["svm", "dashboard"])
5959
.assert();
60-
60+
6161
// The dashboard might not work in a test environment, so we're just checking
6262
// that the command is recognized
6363
assert.stderr(predicate::str::contains("Unknown command").not());
@@ -69,10 +69,10 @@ fn test_svm_with_config_file() {
6969
// Create a temporary directory and config file
7070
let temp_dir = create_temp_dir();
7171
let config_path = create_mock_config(&temp_dir);
72-
72+
7373
// Run the command with the config file
7474
let output = run_osvm_command_string(&["-C", config_path.to_str().unwrap(), "svm", "list"]);
75-
75+
7676
// Verify the output contains expected headers
7777
assert!(output_contains(&output, "Available SVMs in the chain:"));
7878
}
@@ -83,10 +83,10 @@ fn test_svm_with_url() {
8383
// Create a mock server
8484
let mock_server = MockServer::new();
8585
let _mock = mock_server.mock_svm_list();
86-
86+
8787
// Run the command with a custom URL
8888
let output = run_osvm_command_string(&["--url", &format!("http://{}", mock_server.server.host_with_port()), "svm", "list"]);
89-
89+
9090
// Verify the output contains expected headers
9191
assert!(output_contains(&output, "Available SVMs in the chain:"));
9292
}

0 commit comments

Comments
 (0)