Open taoeffect opened 8 years ago
@taoeffect Are you running an RPC client? I think some of the latest changes to truffle have squelched an error stating your ethereum client of choice (eth, geth, pyethereum, testrpc, ethersim) must be running.
Just for other readers, this thread continues here: https://github.com/ConsenSys/truffle/issues/54#issuecomment-156580305
OK, now using @tcoulter's build of EtherSim the tests run, but break:
-> % truffle test
Using environment test.
Compiling contracts...
Contract: Board
- can randomly add eth
1) returns eth in bulk
Contract: Creature
2) should let the brain move it
3) should let the brain harvest eth
4) should let the brain attack neighbors
5) should die if brought to 0 hp
6) should allow the brain to reproduce
7) should only allow actions on its turn
Contract: Game
✓ generates a board (310ms)
8) allows creatures to be added
1 passing (3s)
1 pending
8 failing
1) Contract: Board returns eth in bulk:
AssertionError: expected 0 to equal 9
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/board.js:30:14
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
2) Contract: Creature should let the brain move it:
TypeError: creature.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:21:23
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
3) Contract: Creature should let the brain harvest eth:
TypeError: creature.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:60:23
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
4) Contract: Creature should let the brain attack neighbors:
TypeError: creature_1.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:107:27
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
5) Contract: Creature should die if brought to 0 hp:
TypeError: creature_1.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:139:27
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
6) Contract: Creature should allow the brain to reproduce:
TypeError: creature_1.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:199:25
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
7) Contract: Creature should only allow actions on its turn:
TypeError: creature.notify_of_turn is not a function
at /Users/greg/dapps/mine/truffle_demo-dao-wars/test/creature.js:243:23
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
8) Contract: Game allows creatures to be added:
Error: done() invoked with non-Error: invalid address
at tryCatcher (node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (node_modules/bluebird/js/main/promise.js:507:31)
at Promise._settlePromiseAt (node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromises (node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (node_modules/bluebird/js/main/async.js:15:14)
at Function.module.exports.loopWhile (node_modules/deasync/index.js:64:21)
at node_modules/deasync/index.js:36:18
at runTask (truffle.es6:55:5)
at Object.<anonymous> (truffle.es6:347:14)
at normalLoader (node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) [as .es6] (node_modules/babel-core/lib/api/register/node.js:216:7)
at Object.<anonymous> (node_modules/babel/lib/_babel-node.js:144:25)
at node.js:972:3
EtherSim, meanwhile, returned: http://pastebin.com/Z9GZud53
Using Truffle v0.2.7, node 4.2.1, I run
truffle test
in the directory and get:So I tried installing latest version of node (5.0.0), and after fighting to get truffle installed (https://github.com/ConsenSys/truffle/issues/53) I get a slightly different error, but virtually the same:
This is on OS X with latest cpp-ethereum (though I doubt that matters in this case).