Manually camelCase solana program json (#14907)

This commit is contained in:
Tyera Eulberg
2021-01-28 13:41:57 -07:00
committed by GitHub
parent d4cc7c6b66
commit 7e2e0d4a86
3 changed files with 42 additions and 43 deletions

View File

@@ -66,7 +66,7 @@ fn test_cli_program_deploy_non_upgradeable() {
let program_id_str = json
.as_object()
.unwrap()
.get("ProgramId")
.get("programId")
.unwrap()
.as_str()
.unwrap();
@@ -202,7 +202,7 @@ fn test_cli_program_deploy_no_authority() {
let program_id_str = json
.as_object()
.unwrap()
.get("ProgramId")
.get("programId")
.unwrap()
.as_str()
.unwrap();
@@ -291,7 +291,7 @@ fn test_cli_program_deploy_with_authority() {
let program_pubkey_str = json
.as_object()
.unwrap()
.get("ProgramId")
.get("programId")
.unwrap()
.as_str()
.unwrap();
@@ -338,7 +338,7 @@ fn test_cli_program_deploy_with_authority() {
let program_pubkey_str = json
.as_object()
.unwrap()
.get("ProgramId")
.get("programId")
.unwrap()
.as_str()
.unwrap();
@@ -407,7 +407,7 @@ fn test_cli_program_deploy_with_authority() {
let new_upgrade_authority_str = json
.as_object()
.unwrap()
.get("Authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
@@ -459,7 +459,7 @@ fn test_cli_program_deploy_with_authority() {
let authority_pubkey_str = json
.as_object()
.unwrap()
.get("Program upgrade authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
@@ -480,11 +480,11 @@ fn test_cli_program_deploy_with_authority() {
let new_upgrade_authority_str = json
.as_object()
.unwrap()
.get("Authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
assert_eq!(new_upgrade_authority_str, "None");
assert_eq!(new_upgrade_authority_str, "none");
// Upgrade with no authority
config.signers = vec![&keypair, &new_upgrade_authority];
@@ -521,7 +521,7 @@ fn test_cli_program_deploy_with_authority() {
let program_pubkey_str = json
.as_object()
.unwrap()
.get("ProgramId")
.get("programId")
.unwrap()
.as_str()
.unwrap();
@@ -549,11 +549,11 @@ fn test_cli_program_deploy_with_authority() {
let authority_pubkey_str = json
.as_object()
.unwrap()
.get("Program upgrade authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
assert_eq!("None", authority_pubkey_str);
assert_eq!("none", authority_pubkey_str);
}
#[test]
@@ -618,7 +618,7 @@ fn test_cli_program_write_buffer() {
let buffer_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer")
.get("buffer")
.unwrap()
.as_str()
.unwrap();
@@ -652,7 +652,7 @@ fn test_cli_program_write_buffer() {
let buffer_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer")
.get("buffer")
.unwrap()
.as_str()
.unwrap();
@@ -683,7 +683,7 @@ fn test_cli_program_write_buffer() {
let authority_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
@@ -709,7 +709,7 @@ fn test_cli_program_write_buffer() {
let buffer_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer")
.get("buffer")
.unwrap()
.as_str()
.unwrap();
@@ -747,7 +747,7 @@ fn test_cli_program_write_buffer() {
let buffer_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer")
.get("buffer")
.unwrap()
.as_str()
.unwrap();
@@ -782,7 +782,7 @@ fn test_cli_program_write_buffer() {
let buffer_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer")
.get("buffer")
.unwrap()
.as_str()
.unwrap();
@@ -804,11 +804,11 @@ fn test_cli_program_write_buffer() {
let authority_pubkey_str = json
.as_object()
.unwrap()
.get("Buffer authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
assert_eq!("None", authority_pubkey_str);
assert_eq!("none", authority_pubkey_str);
}
#[test]
@@ -885,7 +885,7 @@ fn test_cli_program_set_buffer_authority() {
let new_buffer_authority_str = json
.as_object()
.unwrap()
.get("Authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
@@ -912,7 +912,7 @@ fn test_cli_program_set_buffer_authority() {
let buffer_authority_str = json
.as_object()
.unwrap()
.get("Authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
@@ -939,11 +939,11 @@ fn test_cli_program_set_buffer_authority() {
let buffer_authority_str = json
.as_object()
.unwrap()
.get("Authority")
.get("authority")
.unwrap()
.as_str()
.unwrap();
assert_eq!(buffer_authority_str, "None");
assert_eq!(buffer_authority_str, "none");
let buffer_account = rpc_client.get_account(&buffer_keypair.pubkey()).unwrap();
if let UpgradeableLoaderState::Buffer { authority_address } = buffer_account.state().unwrap() {
assert_eq!(authority_address, None);