From 1967d20bdf6dff348ee04b9ad55dff15b929ffbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Guti=C3=A9rrez?= Date: Fri, 22 Feb 2019 10:22:46 +0100 Subject: [PATCH] unlocking spree accounts --- .travis.yml | 1 + integration/ocean/SecretStore.test.ts | 2 +- scripts/unlock-spree-accounts.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 scripts/unlock-spree-accounts.sh diff --git a/.travis.yml b/.travis.yml index 83f5111..05b1d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ before_script: - export KEEPER_VERSION=v0.6.12 - bash -x start_ocean.sh --latest --no-brizo --no-pleuston --local-spree-node 2>&1 > start_ocean.log & - cd .. + - ./scripts/unlock-spree-accounts.sh 2>&1 > /dev/null & script: - export ETH_PORT=18545; npm run test:cover diff --git a/integration/ocean/SecretStore.test.ts b/integration/ocean/SecretStore.test.ts index 1bd0a26..ccdf67a 100644 --- a/integration/ocean/SecretStore.test.ts +++ b/integration/ocean/SecretStore.test.ts @@ -17,7 +17,7 @@ describe("Secret Store", () => { ocean = await Ocean.getInstance(config) // Accounts - account = new Account("0xa99d43d86a0758d5632313b8fa3972b6088a21bb") + account = new Account("0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0") account.setPassword("secret") }) diff --git a/scripts/unlock-spree-accounts.sh b/scripts/unlock-spree-accounts.sh new file mode 100755 index 0000000..3b1bda6 --- /dev/null +++ b/scripts/unlock-spree-accounts.sh @@ -0,0 +1,12 @@ +count=0 +echo "Starting..." +while sleep 0.2; + do + curl --data '{"method":"personal_unlockAccount","params":["0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e","node0",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 &> /dev/null; + curl --data '{"method":"personal_unlockAccount","params":["0x068Ed00cF0441e4829D9784fCBe7b9e26D4BD8d0","secret",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 &> /dev/null; + count=$((count+1)); + echo -en "\e[1A"; + echo -e "\e[0K\rRequest ${count}"; +done + +