diff --git a/integration_tests/features/BaseNodeAutoUpdate.feature b/integration_tests/features/BaseNodeAutoUpdate.feature index 02b5a2dd45..d5807462cc 100644 --- a/integration_tests/features/BaseNodeAutoUpdate.feature +++ b/integration_tests/features/BaseNodeAutoUpdate.feature @@ -1,13 +1,10 @@ @auto_update Feature: AutoUpdate - # Not sure why this takes so long on CI - @long-running @broken Scenario: Auto update finds a new update on base node Given I have a node NODE_A with auto update enabled Then NODE_A has a new software update - @broken Scenario: Auto update ignores update with invalid signature on base node Given I have a node NODE_A with auto update configured with a bad signature And I wait 10 seconds diff --git a/integration_tests/features/WalletAutoUpdate.feature b/integration_tests/features/WalletAutoUpdate.feature index 4967d2ffbc..58ff8f8d46 100644 --- a/integration_tests/features/WalletAutoUpdate.feature +++ b/integration_tests/features/WalletAutoUpdate.feature @@ -1,13 +1,10 @@ @auto_update Feature: AutoUpdate - # Not sure why this takes so long on CI - @long-running @broken Scenario: Auto update finds a new update on wallet Given I have a wallet WALLET with auto update enabled Then WALLET has a new software update - @broken Scenario: Auto update ignores update with invalid signature on wallet Given I have a wallet WALLET with auto update configured with a bad signature And I wait 10 seconds diff --git a/integration_tests/features/support/steps.js b/integration_tests/features/support/steps.js index 9dccf054d8..2a7b2f6777 100644 --- a/integration_tests/features/support/steps.js +++ b/integration_tests/features/support/steps.js @@ -21,11 +21,11 @@ const TransactionBuilder = require("../../helpers/transactionBuilder"); let lastResult; const AUTOUPDATE_HASHES_TXT_URL = - "https://raw.githubusercontent.com/sdbondi/tari/autoupdate-test-branch/meta/hashes.txt"; + "https://raw.githubusercontent.com/tari-project/tari/development/meta/hashes.txt"; const AUTOUPDATE_HASHES_TXT_SIG_URL = - "https://github.com/sdbondi/tari/raw/autoupdate-test-branch/meta/good.sig"; + "https://raw.githubusercontent.com/tari-project/tari/development/meta/hashes.txt.sig"; const AUTOUPDATE_HASHES_TXT_BAD_SIG_URL = - "https://github.com/sdbondi/tari/raw/autoupdate-test-branch/meta/bad.sig"; + "https://raw.githubusercontent.com/tari-project/tari/development/meta/hashes.txt.bad.sig"; Given(/I have a seed node (.*)/, { timeout: 20 * 1000 }, async function (name) { return await this.createSeedNode(name); @@ -91,6 +91,7 @@ Given( const node = await this.createNode(name, { common: { auto_update: { + check_interval: 10, enabled: true, dns_hosts: ["_test_autoupdate.tari.io"], hashes_url: AUTOUPDATE_HASHES_TXT_URL, @@ -110,6 +111,7 @@ Given( const node = await this.createNode(name, { common: { auto_update: { + check_interval: 10, enabled: true, dns_hosts: ["_test_autoupdate.tari.io"], hashes_url: AUTOUPDATE_HASHES_TXT_URL, @@ -129,6 +131,7 @@ Given( await this.createAndAddWallet(name, "", { common: { auto_update: { + check_interval: 10, enabled: true, dns_hosts: ["_test_autoupdate.tari.io"], hashes_url: AUTOUPDATE_HASHES_TXT_URL, @@ -146,6 +149,7 @@ Given( await this.createAndAddWallet(name, "", { common: { auto_update: { + check_interval: 10, enabled: true, dns_hosts: ["_test_autoupdate.tari.io"], hashes_url: AUTOUPDATE_HASHES_TXT_URL, @@ -970,12 +974,14 @@ Then( let client = await this.getNodeOrWalletClient(name); await sleep(5000); await waitFor( - async () => client.checkForUpdates().has_update, + async () => (await client.checkForUpdates()).has_update, false, 60 * 1000 ); - expect(client.checkForUpdates().has_update, "There should be no update").to - .be.false; + expect( + (await client.checkForUpdates()).has_update, + "There should be no update" + ).to.be.false; } ); @@ -985,14 +991,14 @@ Then( async function (name) { let client = await this.getNodeOrWalletClient(name); await waitFor( - async () => { - return client.checkForUpdates().has_update; - }, + async () => (await client.checkForUpdates()).has_update, true, - 1150 * 1000 + 60 * 1000 ); - expect(client.checkForUpdates().has_update, "There should be update").to.be - .true; + expect( + (await client.checkForUpdates()).has_update, + "There should be update" + ).to.be.true; } ); diff --git a/integration_tests/helpers/config.js b/integration_tests/helpers/config.js index ef06a75449..200fac6fbb 100644 --- a/integration_tests/helpers/config.js +++ b/integration_tests/helpers/config.js @@ -44,6 +44,9 @@ function mapEnvs(options) { ? "true" : "false"; } + if (auto_update.check_interval) { + res.TARI_COMMON__AUTO_UPDATE__CHECK_INTERVAL = auto_update.check_interval; + } if (auto_update.dns_hosts) { res.TARI_COMMON__AUTO_UPDATE__DNS_HOSTS = auto_update.dns_hosts.join(","); } diff --git a/meta/hashes.txt.bad.sig b/meta/hashes.txt.bad.sig new file mode 100644 index 0000000000..8dbfb087bf Binary files /dev/null and b/meta/hashes.txt.bad.sig differ