Skip to content

Commit

Permalink
Implementation of stake ops automation testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
danpaul000 committed Mar 12, 2020
1 parent 5dc4993 commit 0801b38
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions system-test/automation_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ function get_slot {
ssh "${sshOptions[@]}" "${validatorIpList[0]}" '$HOME/.cargo/bin/solana slot'
}

function get_bootstrap_validator_ip_address {
source "${REPO_ROOT}"/net/common.sh
loadConfigFile
echo ${validatorIpList[0]}
}

function upload_results_to_slack() {
echo --- Uploading results to Slack Performance Results App

Expand Down
5 changes: 5 additions & 0 deletions system-test/stake-operations-testcases/offline_stake_colo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
steps:
- command: "system-test/stake-operations-testcases/stake_test_automation.sh"
label: "Running Offline Stake Operations Tests"
agents:
- "queue=colo-deploy"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ -n "$1" ]]; then
fi

if [[ -z "$url" ]]; then
echo Provide complete URL, ex: "$0" http://testnet.solana.com:8899
echo Provide complete URL, ex: "$0" http://devnet.solana.com:8899
exit 1
fi
solana config set --url $url
Expand Down
19 changes: 19 additions & 0 deletions system-test/stake-operations-testcases/stake_test_automation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -e
set -x

# shellcheck disable=SC1091
source "$(dirname "$0")"/../automation_utils.sh

curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.0.5/install/solana-install-init.sh | sh -s - 1.0.5

# Create a single node cluster on colo, then call offline_stake_operations.sh against that cluster
"${REPO_ROOT}"/net/colo.sh delete --reclaim-preemptible-reservations
"${REPO_ROOT}"/net/colo.sh create -n 1 -c 0 -p stake-ops-testnet --dedicated
"${REPO_ROOT}"/net/net.sh start -t edge

bootstrapper_ip_address="$(get_bootstrap_validator_ip_address)"
entrypoint=http://"${bootstrapper_ip_address}":8899

"${REPO_ROOT}"/system-test/stake-operations-testcases/offline_stake_operations.sh "$entrypoint"

0 comments on commit 0801b38

Please sign in to comment.