Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Use blockchain snapshot for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Aug 22, 2017
1 parent 97ca7c1 commit c650d1f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ app/*.map
app/app.js
.vscode
.idea
blockchain_explorer.db.gz
5 changes: 1 addition & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ node('lisk-nano-01'){
try {
sh '''#!/bin/bash
cd ~/lisk-test-nano
bash lisk.sh rebuild -0
bash lisk.sh rebuild -f /home/lisk/lisk-test-nano/blockchain_explorer.db.gz
'''
} catch (err) {
currentBuild.result = 'FAILURE'
Expand Down Expand Up @@ -107,9 +107,6 @@ node('lisk-nano-01'){
stage ('Start Dev Server and Run Tests') {
try {
sh '''
# Prepare lisk core for testing
bash ./e2e-transactions.sh
# Run Dev build and Build
cd $WORKSPACE
export NODE_ENV=
Expand Down
9 changes: 7 additions & 2 deletions e2e-test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ if [ -z "$1" ]
exit 1
fi

if [ ! -f blockchain_explorer.db.gz ]; then
wget https://downloads.lisk.io/lisk-explorer/dev/blockchain_explorer.db.gz
fi

pwd=`pwd`
cd $1
pm2 stop app.js
dropdb lisk_test && createdb lisk_test
dropdb lisk_test
createdb lisk_test
gunzip -fcq "$pwd/blockchain_explorer.db.gz" | psql -d lisk_test
pm2 start app.js
sleep 5
cd $pwd

./e2e-transactions.sh
18 changes: 0 additions & 18 deletions e2e-transactions.sh

This file was deleted.

1 change: 0 additions & 1 deletion features/support/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const accounts = {
address: '16422276087748907680L',
},
'second passphrase account': {
// TODO: register the second passphrase in ./e2e-test-setup.sh
passphrase: 'awkward service glimpse punch genre calm grow life bullet boil match like',
secondPassphrase: 'forest around decrease farm vanish permit hotel clay senior matter endorse domain',
address: '1155682438012955434L',
Expand Down

0 comments on commit c650d1f

Please sign in to comment.