From 4d46d4dd34f57b6dc9d1d021df07712bf3ed02b0 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Thu, 30 Sep 2021 16:02:58 +0100 Subject: [PATCH] Move integration test config file it now lives in config/ because it was being loaded there by the tests before it could be copied to there from the test directory --- README.md | 4 ++-- {test/integration/config => config}/harness.yaml | 3 +++ test/integration/mjolnirSetupUtils.ts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) rename {test/integration/config => config}/harness.yaml (97%) diff --git a/README.md b/README.md index 0eb047a2..3d66443e 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,6 @@ mx-tester down ### Running integration tests The integration tests can be run with `yarn test:integration`. -The config that the tests use is in `test/integration/config/harness.yaml` +The config that the tests use is in `config/harness.yaml` and by default this is configured to work with the server specified in `mx-tester.yml`, -but you can configure it however you like to run against your own setup. \ No newline at end of file +but you can configure it however you like to run against your own setup. diff --git a/test/integration/config/harness.yaml b/config/harness.yaml similarity index 97% rename from test/integration/config/harness.yaml rename to config/harness.yaml index c70936c5..9c94bdb3 100644 --- a/test/integration/config/harness.yaml +++ b/config/harness.yaml @@ -1,3 +1,6 @@ +# This configuration file is for the integration tests run by yarn:integration. +# Editing this will do nothing and you shouldn't use it as a template. +# For a template use default.yaml # Where the homeserver is located (client-server URL). This should point at # pantalaimon if you're using that. homeserverUrl: "http://localhost:9999" diff --git a/test/integration/mjolnirSetupUtils.ts b/test/integration/mjolnirSetupUtils.ts index b6b43a7a..d9b071ec 100644 --- a/test/integration/mjolnirSetupUtils.ts +++ b/test/integration/mjolnirSetupUtils.ts @@ -23,8 +23,6 @@ import { } from "matrix-bot-sdk"; import { Mjolnir} from '../../src/Mjolnir'; import config from "../../src/config"; -import * as path from 'path'; -import * as fs from 'fs/promises'; import { registerUser } from "./clientHelper"; /** @@ -47,7 +45,6 @@ export async function ensureAliasedRoomExists(client: MatrixClient, alias: strin } async function configureMjolnir() { - await fs.copyFile(path.join(__dirname, 'config', 'harness.yaml'), path.join(__dirname, '../../config/harness.yaml')); await registerUser('mjolnir', 'mjolnir', 'mjolnir', true).catch(e => { if (e.isAxiosError && e.response.data.errcode === 'M_USER_IN_USE') { console.log('mjolnir already registered, skipping');