Skip to content

UnitTest: remove duplicate assignments #344

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions basics/account-data/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/account_data_program.so
4 changes: 2 additions & 2 deletions basics/checking-accounts/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/checking_accounts_program.so
4 changes: 2 additions & 2 deletions basics/close-account/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/close_account_native_program.so
2 changes: 1 addition & 1 deletion basics/close-account/steel/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
4 changes: 2 additions & 2 deletions basics/create-account/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/create_account_program.so
4 changes: 2 additions & 2 deletions basics/favorites/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/favorites_native.so
4 changes: 0 additions & 4 deletions basics/favorites/native/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ test('Set the favorite pda and cross-check the updated data', async () => {
tx.feePayer = payer.publicKey;
tx.recentBlockhash = blockhash
tx.sign(payer)
tx.recentBlockhash = blockhash;
await client.processTransaction(tx);

const account = await client.getAccount(favoritesPda);
Expand Down Expand Up @@ -132,7 +131,6 @@ test('Set the favorite pda and cross-check the updated data', async () => {
tx.feePayer = payer.publicKey;
tx.recentBlockhash = blockhash
tx.sign(payer)
tx.recentBlockhash = blockhash;
try {
await client.processTransaction(tx)
console.error("Expected the test to fail")
Expand Down Expand Up @@ -161,7 +159,6 @@ test('Set the favorite pda and cross-check the updated data', async () => {
tx1.feePayer = payer.publicKey;
tx1.recentBlockhash = blockhash
tx1.sign(payer)
tx1.recentBlockhash = blockhash;
await client.processTransaction(tx1)


Expand All @@ -180,7 +177,6 @@ test('Set the favorite pda and cross-check the updated data', async () => {
tx.feePayer = payer.publicKey;
tx.recentBlockhash = blockhash
tx.sign(payer)
tx.recentBlockhash = blockhash;
await client.processTransaction(tx);
})
})
4 changes: 2 additions & 2 deletions basics/hello-solana/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/hello_solana_program.so
4 changes: 2 additions & 2 deletions basics/pda-rent-payer/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/pda_rent_payer_program.so
4 changes: 2 additions & 2 deletions basics/processing-instructions/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/processing_instructions_program.so
4 changes: 2 additions & 2 deletions basics/program-derived-addresses/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/program_derived_addresses_program.so
4 changes: 2 additions & 2 deletions basics/realloc/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/realloc_program.so
2 changes: 1 addition & 1 deletion basics/rent/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
4 changes: 2 additions & 2 deletions basics/repository-layout/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/repository_layout_program.so
4 changes: 2 additions & 2 deletions basics/transfer-sol/native/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/transfer_sol_program.so
2 changes: 1 addition & 1 deletion basics/transfer-sol/steel/cicd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# It also serves as a reference for the commands used for building & deploying Solana programs.
# Run this bad boy with "bash cicd.sh" or "./cicd.sh"

cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so
solana program deploy ./program/target/so/program.so