File tree 3 files changed +22
-5
lines changed
3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 21
21
fail-fast : false
22
22
matrix :
23
23
include :
24
+ - label : Py 3.10, SQLite, Monolith
25
+ sytest-tag : bookworm-python3.10
26
+
24
27
- label : Py 3.10, PG 14, Monolith
25
28
sytest-tag : bookworm-python3.10
26
29
postgres : postgres
Original file line number Diff line number Diff line change @@ -374,11 +374,9 @@ sub _get_dbconfigs
374
374
foreach my $db ( keys %db_configs ) {
375
375
my $db_config = $db_configs {$db };
376
376
377
- # Extract the name of the module that is used to access the database. This
378
- # does add a new item to the database config block, 'type'. It appears to
379
- # be harmless and is used later on to determine which method to use to
380
- # clear the database
381
- my $db_name = $db_config -> {name };
377
+ # Backwards compatibility: the `type` field in the sytest database config
378
+ # used to be called `name` and have different values. We fix that up here.
379
+ my $db_name = delete $db_config -> {name };
382
380
if ( defined $db_name ) {
383
381
if ( $db_name eq ' psycopg2' ) {
384
382
$db_config -> {type } = ' pg' ;
Original file line number Diff line number Diff line change @@ -125,6 +125,22 @@ sub start
125
125
},
126
126
);
127
127
128
+ # convert sytest db args onto synapse db args
129
+ for my $db ( keys %db_configs ) {
130
+ my %db_config = %{ $db_configs {$db } };
131
+
132
+ my $db_type = $db_config {type };
133
+
134
+ if ( $db_type eq " pg" ) {
135
+ $db_configs {$db }{name } = ' psycopg2' ;
136
+ } elsif ($db_type eq " sqlite" ) {
137
+ $db_configs {$db }{name } = ' sqlite3' ;
138
+ } else {
139
+ # We should have already validated the database type here.
140
+ die " Unrecognized database type: '$db_type '" ;
141
+ }
142
+ }
143
+
128
144
# Clean up the media_store directory each time, or else it fills up with
129
145
# thousands of automatically-generated avatar images
130
146
if ( -d " $hs_dir /media_store" ) {
You can’t perform that action at this time.
0 commit comments