truffle-box / optimism-box

Truffle box with code to start working with Optimism L2
MIT License
23 stars 14 forks source link

In some configurations truffle test fails #9

Closed qbzzt closed 3 years ago

qbzzt commented 3 years ago

I want to teach people to test with plain Ethernet before going to Optimistic Ethereum. Right now when I run:

truffle unbox optimism
truffle test

I get this error:

ori@truffle:~/dapp$ truffle test

Compiling your contracts...
===========================
> Compiling ./contracts/ethereum/SimpleStorage.sol
> Artifacts written to /tmp/test--48799-uGMGDCo2h78Z
> Compiled successfully using:
   - solc: 0.7.6+commit.7338295f.Emscripten.clang

TypeError: Db.connect is not a function
    at Migration._deploy (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:128:1)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Migration._load (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
    at Migration.run (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:218:1)
    at Object.runMigrations (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at Object.runAll (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:114:1)
    at Object.run (/usr/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:79:1)
    at Object.run (/usr/lib/node_modules/truffle/build/webpack:/packages/core/lib/testing/Test.js:109:1)
    at Object.run (/usr/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/test/index.js:160:1)
    at Command.run (/usr/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:167:1)
Truffle v5.3.14 (core: 5.3.14)
Node v12.22.2
ori@truffle:~/dapp$ 

Is there a reason the db is there? If I disable it, everything works.

fainashalts commented 3 years ago

Closing this issue as we've disabled DB for now. Will ensure tests work as expected when DB is re-enabled!