From 350b013335fc75069a0a8e077f87f494548af1bd Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Tue, 30 Jul 2019 16:27:41 -0700 Subject: [PATCH] Set insecure flag for gateways --- test/6_test_deploy_header.js | 5 ++++- test/7_test_failures.js | 5 ++++- test/8_test_oasis_client.js | 8 ++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/test/6_test_deploy_header.js b/test/6_test_deploy_header.js index 7e23559..6e52557 100644 --- a/test/6_test_deploy_header.js +++ b/test/6_test_deploy_header.js @@ -15,10 +15,13 @@ if (truffleConfig.shouldRun(__filename)) { contract('Deploy Header', async (accounts) => { let labels = ['non-confidential', 'confidential']; + const insecure = true; + oasis.setGateway( new oasis.gateways.Web3Gateway( utils.wsProviderUrl(), - new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK) + new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK), + insecure ) ); diff --git a/test/7_test_failures.js b/test/7_test_failures.js index 7e561c6..9634ff7 100644 --- a/test/7_test_failures.js +++ b/test/7_test_failures.js @@ -10,10 +10,13 @@ let mantleCounterBytecode = require('fs').readFileSync( '/workdir/tests/e2e-tests/mantle/mantle-counter/target/service/mantle-counter.wasm' ); +const insecure = true; + oasis.setGateway( new oasis.gateways.Web3Gateway( utils.wsProviderUrl(), - new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK) + new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK), + insecure ) ); diff --git a/test/8_test_oasis_client.js b/test/8_test_oasis_client.js index 41fe268..8c81cfb 100644 --- a/test/8_test_oasis_client.js +++ b/test/8_test_oasis_client.js @@ -21,11 +21,15 @@ if (truffleConfig.shouldRun(__filename)) { label: 'mantle' } ]; + + const insecure = true; + const gateways = [ { gateway: new oasis.gateways.Web3Gateway( utils.wsProviderUrl(), - new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK) + new oasis.Wallet(truffleConfig.OASIS_CLIENT_SK), + insecure ), completion: test => test.gateway.disconnect(), options: { gasLimit: '0xe79732' }, @@ -33,7 +37,7 @@ if (truffleConfig.shouldRun(__filename)) { }, { gateway: new oasis.gateways.Gateway(truffleConfig.DEVELOPER_GATEWAY_URL, { headers: new Map([['X-OASIS-INSECURE-AUTH', 'VALUE']]) - }), + }, insecure), completion: _test => {}, options: undefined, label: 'dev-gw'