-
Notifications
You must be signed in to change notification settings - Fork 29
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
🐘 Test on PG 11 and 12 #401
Conversation
psql -h localhost -U postgres -c "CREATE USER mailroom_test PASSWORD 'temba';" | ||
psql -h localhost -U postgres -c "ALTER ROLE mailroom_test WITH SUPERUSER;" | ||
psql -h localhost -U postgres -c "CREATE DATABASE mailroom_test;" | ||
export PGPASSWORD=temba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker image with postgres is now postgis:postgis instead of mdillon:postgis and it seems this new one doesn't set POSTGRES_HOST_AUTH_METHOD=trust so you need to set a password for the superuser account and then set it here as an env for psql to use.
Codecov Report
@@ Coverage Diff @@
## master #401 +/- ##
=======================================
Coverage 55.17% 55.17%
=======================================
Files 115 115
Lines 7956 7956
=======================================
Hits 4390 4390
Misses 2866 2866
Partials 700 700
Continue to review full report at Codecov.
|
@@ -251,6 +251,9 @@ WHERE | |||
cc.channel_id = $1 AND | |||
cc.connection_type = $2 AND | |||
cc.external_id = $3 | |||
ORDER BY | |||
cc.id DESC | |||
LIMIT 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicpottier TestTwilioIVR
was failing for PG 12 but after much debugging and thinking oh crap we've written some incompatible SQL somewhere it seems it's a case of SelectChannelConnectionByExternalID
"always" returning the last of multiple matching connections when tests run under PG 10 and 11, but the first for PG 12. I don't understand the IVR stuff well enough yet to know if it should be matching multiple connections, but this at least makes the assumed behavior explicit.
@@ -264,7 +264,7 @@ SELECT ROW_TO_JSON(o) FROM (SELECT | |||
(SELECT CASE is_anon WHEN TRUE THEN 'urns' WHEN FALSE THEN 'none' END) AS redaction_policy, | |||
$2::int AS max_value_length, | |||
(SELECT iso_code FROM orgs_language WHERE id = o.primary_language_id) AS default_language, | |||
(SELECT ARRAY_AGG(iso_code) FROM orgs_language WHERE org_id = o.id) AS allowed_languages, | |||
(SELECT ARRAY_AGG(iso_code ORDER BY iso_code ASC) FROM orgs_language WHERE org_id = o.id) AS allowed_languages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also was causing failing test due to non-deterministic language ordering
No description provided.