Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Dendrite docs as source of truth for Sytest #998

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 1 addition & 56 deletions docs/dendrite-setup.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,3 @@
# How to set up SyTest for Dendrite

Change `server-0/database.yaml` to include the following:

```
args:
database: dendrite
host: /var/run/postgresql
type: pg
```

**Warning, these are settings for a development environment. Take care not to assign superuser roles willy nilly in production.**

## Set up Postgres

(Omit `sudo -u postgres` from below commands if on MacOS):

To get into postgresql interpreter:

```
sudo -u postgres psql
```

Then create a role with your username:

```
CREATE ROLE "<username>" WITH SUPERUSER LOGIN;
```

Create necessary postgres databases:

```
sudo -u postgres createdb dendrite
sudo -u postgres createdb sytest_template
```

SyTest will expect Dendrite to be at `../dendrite` relative to Sytest's root directory.

## Running Tests

Simply run the following to execute tests:

```
./run-tests.pl -I Dendrite::Monolith -W ../dendrite/sytest-whitelist -B ../dendrite/sytest-blacklist
```

## Useful flags

* `-W` applies a test whitelist file, one of which is currently kept up to date
with what sytests Dendrite passes
[here](https://github.com/matrix-org/dendrite/blob/master/sytest-whitelist)

* `-B` applies a test blacklist file, one of which is currently kept up to date
with what sytests are currently flaky (fail *sometimes*) with Dendrite
[here](https://github.com/matrix-org/dendrite/blob/master/sytest-blacklist)

* `-d` lets you set the path to Dendrite's `bin/` directory, in case it's
somewhere other than `../dendrite/bin`
See https://github.com/matrix-org/dendrite/blob/master/docs/sytest.md#using-the-sytest-docker-image