Skip to content
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
16 changes: 8 additions & 8 deletions run-system-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ runs:

- name: "Run Challenge System Tests"
shell: 'script --return --quiet --command "bash {0}"'
if: ${{ always() && env.TESTS_READY && env.RUN_SUBSET_OF_TESTS == 'false' && env.RUN_CHALLENGE_SYSTEM_TESTS == 'true' }}
# if: ${{ always() && env.TESTS_READY && env.RUN_SUBSET_OF_TESTS == 'false' && env.RUN_CHALLENGE_SYSTEM_TESTS == 'true' }}
run: |
echo
echo "======================================================"
Expand All @@ -703,26 +703,26 @@ runs:

####### CREATING ALLOCATION THAT SHOULD RECEIVE CHALLENGES #######
truncate -s 1000000 upload_test_file
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 3 --parity 3 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation1.txt
echo "Allocation 1 hash: $(cat allocation1.txt)"
./zbox upload --allocation "$(cat allocation1.txt)" --localpath ./upload_test_file --remotepath /upload_test_file --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent

####### CREATING ALLOCATION WITH UPLOAD AND DELETE THAT SHOULD NOT RECEIVE CHALLENGES #######
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 3 --parity 3 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation2.txt
echo "Allocation 2 hash: $(cat allocation2.txt)"
./zbox upload --allocation "$(cat allocation2.txt)" --localpath ./upload_test_file --remotepath /upload_test_file --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
sleep 5
./zbox delete --allocation "$(cat allocation2.txt)" --remotepath /upload_test_file --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent

####### CREATING EMPTY ALLOCATION SHOULD NOT RECEIVE CHALLENGES #######
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 3 --parity 3 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation3.txt
echo "Allocation 3 hash: $(cat allocation3.txt)"

######## Updating allocation with add blobber and added blobber should receive challenges #######
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 2 --parity 2 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation4.txt
echo "Allocation 4 hash: $(cat allocation4.txt)"

Expand Down Expand Up @@ -772,7 +772,7 @@ runs:
echo "$add_blobber_id" >> challenge_blobbers.txt

######## Updating allocation with add and remove blobber and where added blobber should receive and removed blobber should not receive challenges ########
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 2 --parity 2 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation5.txt
echo "Allocation 5 hash: $(cat allocation5.txt)"

Expand Down Expand Up @@ -838,7 +838,7 @@ runs:
fi

####### CANCELLED ALLOCATION SHOULD NOT GET CHALLENGES ANYMORE #######
./zwallet faucet --methodName "pour" --tokens 10 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zwallet faucet --methodName "pour" --tokens 1000 --input "{}" --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
./zbox newallocation --lock 0.2 --data 3 --parity 3 --size 1073741824 --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent | grep 'Allocation' | grep -o "[a-z0-9]\{64\}" > allocation6.txt
echo "Allocation 6 hash: $(cat allocation6.txt)"
./zbox upload --allocation "$(cat allocation6.txt)" --localpath ./upload_test_file --remotepath /upload_test_file --configDir . --config ./config.yaml --wallet ./zs3wallet.json --silent
Expand Down Expand Up @@ -870,7 +870,7 @@ runs:
system_tests_exit_code=0

echo "Sleeping for 45 minutes..."
sleep 2700
# sleep 2700
echo "Tests started..."
${GOPATH}/bin/gotestsum --jsonfile test-output.json --hide-summary=output --format testname ${{ env.SHOULD_RETRY_FAILURES }} --raw-command -- ../../CHALLENGE_TEST_RUNNER_COMMAND.sh || system_tests_exit_code=$?
cat test-output.json | ${GOPATH}/bin/go-test-report --groupSize 1 --output ../../${{ env.BRANCH_DIR }}/${GITHUB_SHA}/challengetestscli/index.html --title "0Chain System test suite: Challenge tests [${{ env.BRANCH_DIR }}/${GITHUB_SHA:0:8}] ran against [${{ env.NETWORK_URL }}] at [${{ env.TEST_TIME }}]"
Expand Down
5 changes: 3 additions & 2 deletions set-pr-status/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ runs:
--header "Accept: application/vnd.github.v3+json" \
--header "Authorization: token ${{inputs.github_token}}" \
--header "Content-Type: application/json" > pr.json

status_url=$(cat pr.json | python -c "import json,sys;obj=json.load(sys.stdin);print obj[\"statuses_url\"]")
echo "Full PR JSON response:"
cat pr.json
status_url=$(cat pr.json | python -c "import json,sys;obj=json.load(sys.stdin);print(obj.get(\"statuses_url\", \"\"))")
rm -rf pr.json

curl --silent --location --request POST "$status_url" \
Expand Down