Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from matrix-org/bwindels/disablelltests
Browse files Browse the repository at this point in the history
disable LL tests on travis CI
  • Loading branch information
bwindels committed Sep 19, 2018
2 parents fec1447 + 13b20bb commit 64608af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ trap 'handle_error' ERR

./synapse/start.sh
./riot/start.sh
node start.js
node start.js $@
stop_servers
15 changes: 12 additions & 3 deletions src/scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion start.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 64608af

Please sign in to comment.