tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

`Cannot determine the contract directory` for `tests/01_hello_world.py` #75

Closed noisy closed 5 years ago

noisy commented 5 years ago

branch: dev

13:03 $ python3 tests/01_hello_world.py

###  SCENARIO:                                                                                                                                                                                                     
Create a contract from template, then build and deploy it.                                                                                                                                                         

Removing testnet cache for prefix `_127_0_0_1_8888_`
Testnet cache successfully removed.
Local node is stopped [].
/usr/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 11360 is still running
  ResourceWarning, source=self)
....
Local node is running. Block number is 9
* Wallet name is ``_127_0_0_1_8888_default``, wallet directory is
    /home/noisy/eosio-wallet/.                                                                                                                                                                                     
* Created wallet ``_127_0_0_1_8888_default``.
* Password is saved to the file ``_127_0_0_1_8888_passwords.json`` in the wallet directory.
* The wallet is empty.
######### Create a master account object ``master``.
* Importing keys of the account ``eosio`` into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``master`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:                                                                                                                                                     
    /home/noisy/eosio-wallet/_127_0_0_1_8888_accounts.json                                                                                                                                                         

###  setUpClass:                                                                                                                                                                                                   
Create test accounts:                                                                                                                                                                                              

######### Create an account object ``alice``.
... for a new blockchain account ``css4wtebx1l3``.
* The account object is created.
* Cross-checked: account object ``alice`` mapped to an existing account ``css4wtebx1l3``.
* Importing keys of the account ``css4wtebx1l3`` into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``alice`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:                                                                                                                                                     
    /home/noisy/eosio-wallet/_127_0_0_1_8888_accounts.json                                                                                                                                                         
######### Create an account object ``carol``.
... for a new blockchain account ``gqo5akm4foce``.
* The account object is created.
* Cross-checked: account object ``carol`` mapped to an existing account ``gqo5akm4foce``.
* Importing keys of the account ``gqo5akm4foce`` into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``carol`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /home/noisy/eosio-wallet/_127_0_0_1_8888_accounts.json
######### Create an account object ``bob``.
... for a new blockchain account ``qkcru1l4i2nb``.
* The account object is created.
* Cross-checked: account object ``bob`` mapped to an existing account ``qkcru1l4i2nb``.
* Importing keys of the account ``qkcru1l4i2nb`` into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``bob`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /home/noisy/eosio-wallet/_127_0_0_1_8888_accounts.json

###  test_01:
Create, build and deploy the contract:

######### Create an account object ``host``.
... for a new blockchain account ``5nt2i3d14z5g``.
* The account object is created.
* Cross-checked: account object ``host`` mapped to an existing account ``5nt2i3d14z5g``.
* Importing keys of the account ``5nt2i3d14z5g`` into the wallet ``_127_0_0_1_8888_default``
* Cross-checked: all account keys are in the wallet.
* Account object ``host`` stored in the file 
    ``_127_0_0_1_8888_accounts.json`` in the wallet directory:
    /home/noisy/eosio-wallet/_127_0_0_1_8888_accounts.json
ELocal node is stopped [11360, 11361].

======================================================================
ERROR: test_01 (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/01_hello_world.py", line 43, in test_01
    contract = Contract(host, CONTRACT_WORKSPACE)
  File "/home/noisy/Devel/EOS/ef-test/eosfactory/shell/contract.py", line 101, in __init__
    abi_file=abi_file, wasm_file=wasm_file)
  File "/home/noisy/Devel/EOS/ef-test/eosfactory/shell/contract.py", line 49, in __init__
    self.contract_dir = config.contract_dir(contract_dir)
  File "/home/noisy/Devel/EOS/ef-test/eosfactory/core/config.py", line 378, in contract_dir
    '''.format(trace))
eosfactory.core.errors.Error: ERROR:
Cannot determine the contract directory.
        Tried path list:
        _wslqwjvacdyugodewiyd
/home/noisy/Devel/EOS/workspace/_wslqwjvacdyugodewiyd
/home/noisy/Devel/EOS/ef-test/contracts/_wslqwjvacdyugodewiyd
/home/noisy/Devel/EOS/eos/build/contracts/_wslqwjvacdyugodewiyd

----------------------------------------------------------------------
Ran 1 test in 5.793s

FAILED (errors=1)
noisy commented 5 years ago

confirmed on local environment (Ubuntu 18.04, EOS v1.3.1, python 3.6.6) and on all our new test environments:

selection_999 351

https://travis-ci.com/tokenika/eosfactory/builds/88234555

jakub-zarembinski commented 5 years ago

Fixed with c1ddfd3.