Fix some weird zeppelin tests.

This commit is contained in:
chriseth 2018-02-12 21:27:37 +01:00 committed by Alex Beregszaszi
parent bf36821080
commit 2ce2f08742

View File

@ -41,6 +41,13 @@ DIR=$(mktemp -d)
echo "Running Zeppelin tests..."
git clone --depth 1 https://github.com/OpenZeppelin/zeppelin-solidity.git "$DIR"
cd "$DIR"
# Fix some things that look like bugs (only seemed to fail on Node 6 and not Node 8)
# FIXME: report upstream or to web3.js?
sed -i -e 's/let token = await ERC827TokenMock.new();//;' test/token/ERC827/ERC827Token.js
sed -i -e 's/CappedCrowdsale.new(this.startTime, this.endTime, rate, wallet, 0)/CappedCrowdsale.new(this.startTime, this.endTime, rate, wallet, 0, this.token.address)/' test/crowdsale/CappedCrowdsale.test.js
sed -i -e 's/RefundableCrowdsale.new(this.startTime, this.endTime, rate, wallet, 0, { from: owner })/RefundableCrowdsale.new(this.startTime, this.endTime, rate, wallet, 0, this.token.address, { from: owner })/' test/crowdsale/RefundableCrowdsale.test.js
npm install
find . -name soljson.js -exec cp "$SOLJSON" {} \;