Setup framework to do integration testing (#50)

This commit is contained in:
Azrenbeth
2021-09-06 09:52:13 +01:00
committed by GitHub
parent 011f9f8da5
commit 0f7f2c2660
12 changed files with 316 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
#!/bin/sh
#N.B. the database setup comes from:
#https://github.com/matrix-org/synapse/blob/develop/synapse/storage/schema/state/full_schemas/54/full.sql
# Setup the required tables for testing
psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<SQLCODE
CREATE TABLE state_groups (
id BIGINT PRIMARY KEY,
room_id TEXT NOT NULL,
event_id TEXT NOT NULL
);
CREATE TABLE state_groups_state (
state_group BIGINT NOT NULL,
room_id TEXT NOT NULL,
type TEXT NOT NULL,
state_key TEXT NOT NULL,
event_id TEXT NOT NULL
);
CREATE TABLE state_group_edges (
state_group BIGINT NOT NULL,
prev_state_group BIGINT NOT NULL
);
SQLCODE