From 19cba1dc5759df1d5a40b5f8b7a46897b7f53cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Guti=C3=A9rrez?= Date: Thu, 14 Mar 2019 22:54:04 +0100 Subject: [PATCH] Fix integration test failtures. --- .travis.yml | 3 ++- integration/mocha.opts | 2 +- integration/ocean/ConsumeAssetBrizo.test.ts | 8 +++----- .../wait_for_migration_and_extract_keeper_artifacts.sh | 2 ++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15db5ff..c2bc8cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,9 @@ before_script: - ganache-cli --port 18545 > ganache-cli.log & - git clone https://github.com/oceanprotocol/barge - cd barge + - export KEEPER_VERSION=v0.8.5 - export KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260" - - bash -x start_ocean.sh --latest --no-pleuston --local-spree-node 2>&1 > start_ocean.log & + - bash -x start_ocean.sh --latest --no-pleuston --local-spree-node --no-acl-contract 2>&1 > start_ocean.log & - cd .. - ./scripts/unlock-spree-accounts.sh 2>&1 > /dev/null & diff --git a/integration/mocha.opts b/integration/mocha.opts index 143513b..ea41a5e 100644 --- a/integration/mocha.opts +++ b/integration/mocha.opts @@ -3,4 +3,4 @@ --full-trace --exit --timeout 300000 -integration/ocean/RegisterServiceAgreementTemplates.test.ts integration/**/*.test.ts +integration/ocean/RegisterEscrowAccessSecretStoreTemplate.test.ts integration/**/*.test.ts diff --git a/integration/ocean/ConsumeAssetBrizo.test.ts b/integration/ocean/ConsumeAssetBrizo.test.ts index 4e186de..2e211ea 100644 --- a/integration/ocean/ConsumeAssetBrizo.test.ts +++ b/integration/ocean/ConsumeAssetBrizo.test.ts @@ -56,9 +56,7 @@ describe("Consume Asset (Brizo)", () => { workExample: "stationId,latitude,longitude,datetime,temperature,humidity423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68", files: [ { - url: "https://testocnfiles.blob.core.windows.net/testfiles/testzkp.pdf", - checksum: "085340abffh21495345af97c6b0e761", - contentLength: "12324", + url: "https://raw.githubusercontent.com/oceanprotocol/squid-js/develop/package.json", }, { url: "https://raw.githubusercontent.com/oceanprotocol/squid-js/develop/README.md", @@ -100,12 +98,12 @@ describe("Consume Asset (Brizo)", () => { assert.include(path, folder, "The storage path is not correct.") - const files = await new Promise((resolve) => { + const files = await new Promise((resolve) => { fs.readdir(path, (err, fileList) => { resolve(fileList) }) }) - assert.deepEqual(files, ["README.md", "testzkp.pdf"], "Stored files are not correct.") + assert.deepEqual(files, ["README.md", "package.json"], "Stored files are not correct.") }) }) diff --git a/scripts/wait_for_migration_and_extract_keeper_artifacts.sh b/scripts/wait_for_migration_and_extract_keeper_artifacts.sh index 1360a16..7afaec9 100755 --- a/scripts/wait_for_migration_and_extract_keeper_artifacts.sh +++ b/scripts/wait_for_migration_and_extract_keeper_artifacts.sh @@ -13,6 +13,8 @@ until [ $COMMAND_STATUS -eq 0 ] || [ $RETRY_COUNT -eq 120 ]; do let RETRY_COUNT=RETRY_COUNT+1 done +rm -rf ./artifacts/ + if [ $COMMAND_STATUS -ne 0 ]; then echo "Waited for more than two minutes, but keeper contracts have not been migrated yet. Did you run an Ethereum RPC client and the migration script?" exit 1