-
Notifications
You must be signed in to change notification settings - Fork 26
[DPE-8426] port tests #1206
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
base: 16/edge
Are you sure you want to change the base?
[DPE-8426] port tests #1206
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (64.57%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## 16/edge #1206 +/- ##
========================================
Coverage 64.57% 64.57%
========================================
Files 17 17
Lines 4344 4344
Branches 671 671
========================================
Hits 2805 2805
Misses 1357 1357
Partials 182 182 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
98cb060
to
85ae99f
Compare
85ae99f
to
76fe647
Compare
password: str, | ||
queries: list[str], | ||
database: str, | ||
commit: bool = False, |
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.
Diff: Raw not available for PG.
psycopg2.connect( | ||
f"dbname='{database}' user='{username}' host='{unit_address}' password='{password}' connect_timeout=10" | ||
) as connection, | ||
connection.cursor() as cursor, |
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.
Diff: Getting a cursor is different for psycopg2.
import subprocess | ||
from collections.abc import Callable | ||
|
||
import jubilant |
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.
Diff: Using jubilant, since PG 16 does not need Juju 2 support.
|
||
# Simulating a failure on the primary cluster | ||
for unit_name in model_2_postgresql_units: | ||
model_2.exec("sudo pkill -x postgres --signal SIGSTOP", unit=unit_name) |
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.
Diff: DB process name. No check for Patroni.
charm=charm, | ||
app=POSTGRESQL_APP_1, | ||
base="ubuntu@22.04", | ||
config=configuration, |
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.
Diff: No cluster name in PG.
eff6861
to
744dd63
Compare
744dd63
to
1eb046e
Compare
9fa9066
to
c35a605
Compare
8eaec8a
to
731f8b9
Compare
21cf8ad
to
fa8c884
Compare
a61fbe3
to
e22958c
Compare
Issue
Solution
Checklist