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

Truffle migrations not running custom scripts in each contract test run #386

Closed
elenadimitrova opened this issue Apr 3, 2017 · 1 comment

Comments

@elenadimitrova
Copy link

Issue

The clear-room environment which truffle provides for running each contract test, as specified here http://truffleframework.com/docs/getting_started/testing#clean-room-environment is not running any additional custom migrations scripts.

Steps to Reproduce

You need a custom migrations script, in addition to the 1_initial_migration.js and 2_deploy_contracts.js, e.g. 3_setup_contracts.js and multiple contract test files

contract('MyContract1', function (accounts) {
  beforeEach(function (done) {
    MyContract1.deployed()
    .then(function (_myContract1Instance) {
       ...
    })
.then(done);

run with truffle test

Expected Behavior

Expect after each contract tests are run the migrations to deploy a clean environment AND run the migration scripts.

Actual Results

New contracts are deployed to the network and linked to libraries but the effects of the custom migration script, i.e. 3_setup_contracts.js are not present after the first run.

Environment

  • Operating System: OSX
  • Truffle version: 3.2.1
  • Ethereum client: tested with both parity 1.3.15 and geth 1.5.5
  • node version: 4.6.1
  • npm version: 2.15.9
@elenadimitrova
Copy link
Author

I tested this again today and it no longer seems to be an issue, although I cannot pinpoint which release fixed it for us.

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

No branches or pull requests

1 participant