Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

beta2: truffle migrate and truffle test do not fire up default test environment #643

Closed
SCBuergel opened this issue Oct 29, 2017 · 11 comments
Labels

Comments

@SCBuergel
Copy link

I am running the truffle beta2 on MacOS. I started with the default project:

truffle init
truffle compile
truffle migrate
truffle test

The last two commands give me the following error output:

Could not connect to your Ethereum client. Please check that your Ethereum client:
    - is running
    - is accepting RPC connections (i.e., "--rpc" option is used in geth)
    - is accessible over the network
    - is properly configured in your Truffle configuration file (truffle.js)

I expected this to behave in the same way as migrate and test inside the truffle develop console - which works without a problem in the very same folder.

@brianedelman
Copy link

Did you change your networks to 9545 in the truffle.js?

@leTrice
Copy link

leTrice commented Nov 2, 2017

Hi @brianedelman , just checked this with port 9545 and with port 8546. Same behaviour as described by @SCBuergel . It seems that migration and test scripts are only running under development console (truffle develop).

@brianedelman
Copy link

Ah yes. I have been running truffle develop --log to basically give me the same output as testrpc used to. Migrate and test are done with this running on 9545

@leTrice
Copy link

leTrice commented Nov 3, 2017

Hi @brianedelman , this is exactly the missing piece for me, now i can use it like ethereumjs-testrpc before. Just start another terminal and fire truffle develop --log and in another terminal, you can run truffle migrate or truffle test as before.

@jessebmiller
Copy link

Will truffle test run an in memory testrpc by default as described in #490?

@shuji-koike
Copy link

shuji-koike commented Jan 18, 2018

Tests written in Solidity seems to be working as expected, but JavaScript tests are not?

I wrote some same tests as sol and js.
And as far I can tell, on my environment...

  • if testrpc or ganache is running, both tests passes
  • if development network is defined in config file but testrpc is not running, both tests fails
  • if development network is not defined and testrpc is not running, sol tests passes but js tests fails

BTW I'm newbie in truffle and ethereum, hope my info helps.

@GodwinAdam
Copy link

@Fariha1123
Copy link

Its port 8545 on which testrpc runs, so specify that in your truffle.js. Moreover, in another powershell window just initiate test rpc via this command : testrpc. Hope this works !

@stale
Copy link

stale bot commented Nov 8, 2018

Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.

@stale stale bot added the stale label Nov 8, 2018
@stale
Copy link

stale bot commented Nov 15, 2018

There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks!

@stale stale bot closed this as completed Nov 15, 2018
@dongw00
Copy link

dongw00 commented Feb 10, 2019

It seems to difference with your ethereum client (such as geth, ganache). check your ethereum client's port. you have to match port num in truffle-config.js file.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants