Skip to content
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

nit: fix variable names #16283

Merged
merged 1 commit into from
Apr 1, 2021
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: 4 additions & 4 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2529,12 +2529,12 @@ mod tests {
);

// Test Deploy Subcommand
let test_deploy =
let test_command =
test_commands
.clone()
.get_matches_from(vec!["test", "deploy", "/Users/test/program.o"]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Deploy {
program_location: "/Users/test/program.o".to_string(),
Expand All @@ -2549,14 +2549,14 @@ mod tests {
let custom_address = Keypair::new();
let custom_address_file = make_tmp_path("custom_address_file");
write_keypair_file(&custom_address, &custom_address_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"deploy",
"/Users/test/program.o",
&custom_address_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Deploy {
program_location: "/Users/test/program.o".to_string(),
Expand Down
64 changes: 32 additions & 32 deletions cli/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2194,14 +2194,14 @@ mod tests {
arg_name: "".to_string(),
};

let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"deploy",
"/Users/test/program.so",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::Deploy {
program_location: Some("/Users/test/program.so".to_string()),
Expand All @@ -2218,7 +2218,7 @@ mod tests {
}
);

let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"deploy",
Expand All @@ -2227,7 +2227,7 @@ mod tests {
"42",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::Deploy {
program_location: Some("/Users/test/program.so".to_string()),
Expand All @@ -2247,15 +2247,15 @@ mod tests {
let buffer_keypair = Keypair::new();
let buffer_keypair_file = make_tmp_path("buffer_keypair_file");
write_keypair_file(&buffer_keypair, &buffer_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"deploy",
"--buffer",
&buffer_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::Deploy {
program_location: None,
Expand Down Expand Up @@ -2337,7 +2337,7 @@ mod tests {
let authority_keypair = Keypair::new();
let authority_keypair_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&authority_keypair, &authority_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"deploy",
Expand All @@ -2346,7 +2346,7 @@ mod tests {
&authority_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::Deploy {
program_location: Some("/Users/test/program.so".to_string()),
Expand All @@ -2366,15 +2366,15 @@ mod tests {
}
);

let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"deploy",
"/Users/test/program.so",
"--final",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::Deploy {
program_location: Some("/Users/test/program.so".to_string()),
Expand Down Expand Up @@ -2406,14 +2406,14 @@ mod tests {
};

// defaults
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"write-buffer",
"/Users/test/program.so",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::WriteBuffer {
program_location: "/Users/test/program.so".to_string(),
Expand All @@ -2427,7 +2427,7 @@ mod tests {
);

// specify max len
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"write-buffer",
Expand All @@ -2436,7 +2436,7 @@ mod tests {
"42",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::WriteBuffer {
program_location: "/Users/test/program.so".to_string(),
Expand All @@ -2453,7 +2453,7 @@ mod tests {
let buffer_keypair = Keypair::new();
let buffer_keypair_file = make_tmp_path("buffer_keypair_file");
write_keypair_file(&buffer_keypair, &buffer_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"write-buffer",
Expand All @@ -2462,7 +2462,7 @@ mod tests {
&buffer_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::WriteBuffer {
program_location: "/Users/test/program.so".to_string(),
Expand All @@ -2482,7 +2482,7 @@ mod tests {
let authority_keypair = Keypair::new();
let authority_keypair_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&authority_keypair, &authority_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"write-buffer",
Expand All @@ -2491,7 +2491,7 @@ mod tests {
&authority_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::WriteBuffer {
program_location: "/Users/test/program.so".to_string(),
Expand All @@ -2514,7 +2514,7 @@ mod tests {
let authority_keypair = Keypair::new();
let authority_keypair_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&authority_keypair, &authority_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"write-buffer",
Expand All @@ -2525,7 +2525,7 @@ mod tests {
&authority_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::WriteBuffer {
program_location: "/Users/test/program.so".to_string(),
Expand Down Expand Up @@ -2558,7 +2558,7 @@ mod tests {

let program_pubkey = Pubkey::new_unique();
let new_authority_pubkey = Pubkey::new_unique();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-upgrade-authority",
Expand All @@ -2567,7 +2567,7 @@ mod tests {
&new_authority_pubkey.to_string(),
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetUpgradeAuthority {
program_pubkey,
Expand All @@ -2582,7 +2582,7 @@ mod tests {
let new_authority_pubkey = Keypair::new();
let new_authority_pubkey_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&new_authority_pubkey, &new_authority_pubkey_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-upgrade-authority",
Expand All @@ -2591,7 +2591,7 @@ mod tests {
&new_authority_pubkey_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetUpgradeAuthority {
program_pubkey,
Expand All @@ -2606,15 +2606,15 @@ mod tests {
let new_authority_pubkey = Keypair::new();
let new_authority_pubkey_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&new_authority_pubkey, &new_authority_pubkey_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-upgrade-authority",
&program_pubkey.to_string(),
"--final",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetUpgradeAuthority {
program_pubkey,
Expand All @@ -2629,7 +2629,7 @@ mod tests {
let authority = Keypair::new();
let authority_keypair_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&authority, &authority_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-upgrade-authority",
Expand All @@ -2639,7 +2639,7 @@ mod tests {
"--final",
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetUpgradeAuthority {
program_pubkey,
Expand Down Expand Up @@ -2669,7 +2669,7 @@ mod tests {

let buffer_pubkey = Pubkey::new_unique();
let new_authority_pubkey = Pubkey::new_unique();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-buffer-authority",
Expand All @@ -2678,7 +2678,7 @@ mod tests {
&new_authority_pubkey.to_string(),
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetBufferAuthority {
buffer_pubkey,
Expand All @@ -2693,7 +2693,7 @@ mod tests {
let new_authority_keypair = Keypair::new();
let new_authority_keypair_file = make_tmp_path("authority_keypair_file");
write_keypair_file(&new_authority_keypair, &new_authority_keypair_file).unwrap();
let test_deploy = test_commands.clone().get_matches_from(vec![
let test_command = test_commands.clone().get_matches_from(vec![
"test",
"program",
"set-buffer-authority",
Expand All @@ -2702,7 +2702,7 @@ mod tests {
&new_authority_keypair_file,
]);
assert_eq!(
parse_command(&test_deploy, &default_signer, &mut None).unwrap(),
parse_command(&test_command, &default_signer, &mut None).unwrap(),
CliCommandInfo {
command: CliCommand::Program(ProgramCliCommand::SetBufferAuthority {
buffer_pubkey,
Expand Down