Skip to content

Commit

Permalink
Merge pull request #887 from blockstack/hotfix/circle-ci
Browse files Browse the repository at this point in the history
Refactor api tests for the new api code structure
  • Loading branch information
kantai committed Nov 12, 2018
2 parents c1f3b6b + 525ce20 commit 8be7e43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 2 additions & 3 deletions circle.yml
Expand Up @@ -23,7 +23,6 @@ jobs:
- run:
command: |
source venv/bin/activate
blockstack setup -y --password PASSWORD
blockstack api start -y --password PASSWORD
yes '' | blockstack-core configure || true
sed -i -e 's#http://localhost:6264#https://node.blockstack.org:6263#' ~/.blockstack-server/blockstack-server.ini
python -m blockstack_integration_tests.live_tests.api_tests
blockstack api stop -y
Expand Up @@ -33,6 +33,9 @@
import blockstack.lib.schemas as schemas
import blockstack.lib.storage

from blockstack.lib.config import load_configuration
from blockstack.blockstackd import api_start as api_start_blockstack

BASE_URL = 'http://localhost:5000'

DEFAULT_WALLET_ADDRESS = "1QJQxDas5JhdiXhEbNS14iNjr8auFT96GP"
Expand Down Expand Up @@ -263,7 +266,7 @@ def test_id_price(self):
def test_ns_price(self):
data = self.get_request("/v1/prices/namespaces/id",
headers = {} , status_code=200)
check_data(self, data, {'satoshis':0})
check_data(self, data, {'amount': '64000000000', 'units': 'STACKS'})

class BlockChains(APITestCase):
def test_consensus(self):
Expand Down Expand Up @@ -327,4 +330,12 @@ def test_main(args = []):
sys.exit(1)

if __name__ == '__main__':
test_main(sys.argv[1:])
wdir = os.path.expanduser('~/.blockstack-server')
load_configuration(wdir)
try:
server = api_start_blockstack(wdir, 'localhost', 6270)
test_main(sys.argv[1:])
finally:
server.stop_server()
server.join()

0 comments on commit 8be7e43

Please sign in to comment.