From cf397efed5e46b59b1609f4c16ddb12aab483bdf Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 18 Sep 2018 16:50:33 +0200 Subject: [PATCH] disable LL tests on travis CI --- run.sh | 2 +- src/scenario.js | 15 ++++++++++++--- start.js | 3 ++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index 02b2e4cbdf..daa3bd222c 100755 --- a/run.sh +++ b/run.sh @@ -15,5 +15,5 @@ trap 'handle_error' ERR ./synapse/start.sh ./riot/start.sh -node start.js +node start.js --travis stop_servers diff --git a/src/scenario.js b/src/scenario.js index 12cff7d498..2fd52de679 100644 --- a/src/scenario.js +++ b/src/scenario.js @@ -22,7 +22,7 @@ const roomDirectoryScenarios = require('./scenarios/directory'); const lazyLoadingScenarios = require('./scenarios/lazy-loading'); const e2eEncryptionScenarios = require('./scenarios/e2e-encryption'); -module.exports = async function scenario(createSession, restCreator) { +module.exports = async function scenario(createSession, restCreator, runningOnTravis) { async function createUser(username) { const session = await createSession(username); await signup(session, session.username, 'testtest', session.hsUrl); @@ -32,11 +32,20 @@ module.exports = async function scenario(createSession, restCreator) { const alice = await createUser("alice"); const bob = await createUser("bob"); - const charlies = await createRestUsers(restCreator); await roomDirectoryScenarios(alice, bob); await e2eEncryptionScenarios(alice, bob); - await lazyLoadingScenarios(alice, bob, charlies); + + // disable LL tests until we can run synapse on anything > than 2.7.7 as + // /admin/register fails with a missing method. + // either switch to python3 on synapse, + // blocked on https://github.com/matrix-org/synapse/issues/3900 + // or use a more recent version of ubuntu + // or switch to circleci? + if (!runningOnTravis) { + const charlies = await createRestUsers(restCreator); + await lazyLoadingScenarios(alice, bob, charlies); + } } async function createRestUsers(restCreator) { diff --git a/start.js b/start.js index 1c3f27bbe3..18ccb438ec 100644 --- a/start.js +++ b/start.js @@ -26,6 +26,7 @@ program .option('--windowed', "dont run tests headless", false) .option('--slow-mo', "run tests slower to follow whats going on", false) .option('--dev-tools', "open chrome devtools in browser window", false) + .option('--travis', "running on travis CI, disable tests known to break on Ubuntu 14.04 LTS", false) .parse(process.argv); const hsUrl = 'http://localhost:5005'; @@ -58,7 +59,7 @@ async function runTests() { let failure = false; try { - await scenario(createSession, restCreator); + await scenario(createSession, restCreator, program.travis); } catch(err) { failure = true; console.log('failure: ', err);