-
Notifications
You must be signed in to change notification settings - Fork 20
344 сreate integration tests for airdropper #370
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
s-medvedev
merged 71 commits into
develop
from
344_сreate_integration_tests_for_airdropper
Dec 22, 2021
The head ref may contain hidden characters: "344_\u0441reate_integration_tests_for_airdropper"
Merged
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
5984c19
cherrypick part of changes
613a469
create indexer.py
c0d0e6c
remove solana_receipts_update.py
3f6b5c4
Cherry pick files from old branch
0790298
add requirement
340c854
fix refactoring issues
7449b38
Fix inspection issues
b3dacfa
fix last issue
a50cd47
Merge branch '336_indexer_refactoring' into 337_сreate_base_airdroppe…
2b8f879
Merge remote-tracking branch 'origin/develop' into 337_сreate_base_ai…
f51f2ed
simplify tests
6678924
add test
5d454b7
Merge remote-tracking branch 'origin/develop' into 337_сreate_base_ai…
add136a
add price provider
9a4be44
fix PriceProvider, add test
07aaca8
Add tests. Check worn on all nets
7a46c12
refactoring
2fc1424
integrate price_provider into airdropper
d157d67
integrate price provider
8a6abfd
use new faucet method
3d4dec9
add new parameter to airdropper main
5c29832
Test discriptions for airdropper
6a4efdc
Comments for price provider tests
14aeeed
remove unnecessary comment
bd35791
Merge remote-tracking branch 'origin/develop' into 338_create_sol_pri…
ff1f557
Merge remote-tracking branch 'origin/develop' into 338_create_sol_pri…
c28ca8e
fix error
07dd112
copy from erc20 contract test
023993d
Merge remote-tracking branch 'origin/develop' into 344_сreate_integra…
8c68755
Merge remote-tracking branch 'origin/develop' into 338_create_sol_pri…
f372b08
Merge branch '338_create_sol_price_provider' into 344_сreate_integrat…
ae5bddb
create integration tests
7f4c62c
fix oneline
b9cf0a6
revert changes on test_neon_faucet
1012a6b
fix some errors
dab9c2a
not working
0a4a2a0
add old variant
941f5ba
add helper functions
e223c46
transaction works!
24bc1f1
prepare refactoring
2401784
remove unnecessary code
5325895
Merge remote-tracking branch 'origin/develop' into 338_create_sol_pri…
9743411
Merge branch '338_create_sol_price_provider' into 344_сreate_integrat…
0f5c559
add account creation methods
b3cda28
first test almost ready
8e74e86
fix tests
18d88c7
fir airdropper startup
9ec00c9
One test is completely ready!
89714f6
add complex test case
48a96e7
add services to docker-compose file
89b951a
improve tests
9acbb38
add price update interval parameter
726cb1c
remove unnecessary imports
a1cbad2
fix airdropper run
5167613
Merge branch '338_create_sol_price_provider' into 344_сreate_integrat…
34dcedf
prepare for CI
4ec437f
remove commented
5a03842
fix compose-file
6119fe5
create wrapper class
1ac8877
make tests work!
0f3d41b
fix naming
50faa45
refactor test_erc20_wrapper_contract
4ed6d78
remove duplicated code
c3ce59b
Merge remote-tracking branch 'origin/develop' into 338_create_sol_pri…
e7d92fb
Merge branch '338_create_sol_price_provider' into 344_сreate_integrat…
36178d0
Merge remote-tracking branch 'origin/develop' into 344_сreate_integra…
be99c4c
Merge remote-tracking branch 'origin/develop' into 344_сreate_integra…
b77ed35
Fix tests after merge
146f530
improve deployment scripts, get rid of unnecessary delays in integrat…
df0f1c4
change wait airdrop logic
e07cbe8
use create-test-account.sh script
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
improve deployment scripts, get rid of unnecessary delays in integrat…
…ion tests
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
|
|
||
| if [ -z "$EVM_LOADER" ]; then | ||
| echo "Extracting EVM_LOADER address from keypair file..." | ||
| export EVM_LOADER=$(solana address -k /spl/bin/evm_loader-keypair.json) | ||
| echo "EVM_LOADER=$EVM_LOADER" | ||
| fi | ||
| export AIRDROPPER_MODE='true' | ||
|
|
||
| python3 -m proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/sh | ||
|
|
||
| if [ -z "$SOLANA_URL" ]; then | ||
| echo "SOLANA_URL is not set" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Extracting NEON-EVM's ELF parameters" | ||
| export EVM_LOADER=$(solana address -k /spl/bin/evm_loader-keypair.json) | ||
| export $(/spl/bin/neon-cli --commitment confirmed --url $SOLANA_URL --evm_loader="$EVM_LOADER" neon-elf-params) | ||
|
|
||
| BALANCE=$(solana balance | tr '.' '\t'| tr '[:space:]' '\t' | cut -f1) | ||
| if [ "$BALANCE" -eq 0 ]; then | ||
| echo "SOL balance is 0" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$(spl-token balance "$NEON_TOKEN_MINT" || echo 0)" -eq 0 ]; then | ||
| echo "NEON balance is 0" | ||
| exit 1 | ||
| fi | ||
|
|
||
| faucet run --workers 1 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,44 @@ | ||
| #!/bin/bash | ||
|
|
||
| if [ -z "$SOLANA_URL" ]; then | ||
| echo "SOLANA_URL is not set" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$TEST_FAUCET_INIT_NEON_BALANCE"]; then | ||
| echo "TEST_FAUCET_INIT_NEON_BALANCE is not set" | ||
| exit 1 | ||
| fi | ||
|
|
||
| solana config set -u "$SOLANA_URL" | ||
|
|
||
| echo "Extracting NEON-EVM's ELF parameters" | ||
| export EVM_LOADER=$(solana address -k /spl/bin/evm_loader-keypair.json) | ||
| export $(/spl/bin/neon-cli --commitment confirmed --url $SOLANA_URL --evm_loader="$EVM_LOADER" neon-elf-params) | ||
|
|
||
| faucet run --workers 1 | ||
| echo "Generating new account for operate with faucet service" | ||
| rm /$HOME/.config/solana/id.json | ||
| solana-keygen new --no-passphrase -o "$HOME/.config/solana/id.json" | ||
|
|
||
| ACCOUNT=$(solana address -k "/$HOME/.config/solana/id.json") | ||
| echo "New account $ACCOUNT" | ||
| if ! solana account "$ACCOUNT"; then | ||
| echo "airdropping..." | ||
| solana airdrop 5000 "$ACCOUNT" | ||
| # check that balance >= 10 otherwise airdroping by 1 SOL up to 10 | ||
| BALANCE=$(solana balance "$ACCOUNT" | tr '.' '\t'| tr '[:space:]' '\t' | cut -f1) | ||
| while [ "$BALANCE" -lt 10 ]; do | ||
| solana airdrop 1 "$ACCOUNT" | ||
| sleep 1 | ||
| BALANCE=$(solana balance "$ACCOUNT" | tr '.' '\t'| tr '[:space:]' '\t' | cut -f1) | ||
| done | ||
| fi | ||
|
|
||
| if [ "$(spl-token balance "$NEON_TOKEN_MINT" || echo 0)" -eq 0 ]; then | ||
| echo 'Create balance and mint token' | ||
| TOKEN_ACCOUNT=$( (spl-token create-account "$NEON_TOKEN_MINT" || true) | grep -Po 'Creating account \K[^\n]*') | ||
| echo "TOKEN_ACCOUNT=$TOKEN_ACCOUNT" | ||
| spl-token mint "$NEON_TOKEN_MINT" $TEST_FAUCET_INIT_NEON_BALANCE --owner /spl/bin/evm_loader-keypair.json -- "$TOKEN_ACCOUNT" | ||
| fi | ||
|
|
||
| ./run-faucet.sh | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to use:
create-test-accounts.sh 1?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed