gpu-compute-chain/tests/test_auction_flow_verified.sh

31 lines
1009 B
Bash
Executable File

#!/bin/bash
# Tests the core auction flow with the added factor of specifying which
# providers are verified.
# import utilities
HERE=$(cd $(dirname $BASH_SOURCE) && pwd)
source $HERE/testutil.sh
colineard tx colinearcore unlock-all-funds -y --from alice \
| swallow "Unlock all funds before proceeding"
colineard tx colinearcore lock-funds 550000000 -y --from alice \
| expect_success "Re-lock funds (Alice)"
colineard tx colinearcore lock-funds 550000000 -y --from bob \
| expect_success "Re-lock funds (Bob)"
colineard tx colinearcore new-auction asdf asdf 200 uusdc $(now + 3700) \
'["'$ALICE'"]' '["gtx-1050-ti"]' 4 0 1000 50 \
-y --from bob \
| expect_success "New auction is created"
colineard tx colinearcore new-bid $(get_last_auction_index) 100 \
-y --from bob \
| expect_fail "Unverified provider account can't bid"
colineard tx colinearcore new-bid $(get_last_auction_index) 100 \
-y --from alice \
| expect_success "Verified provider account can bid"