-
Notifications
You must be signed in to change notification settings - Fork 17
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
Updated test_landscape_scalable_bundle_db
test
#378
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
==========================================
- Coverage 81.33% 80.83% -0.50%
==========================================
Files 10 10
Lines 2207 2244 +37
Branches 353 362 +9
==========================================
+ Hits 1795 1814 +19
- Misses 343 356 +13
- Partials 69 74 +5 ☔ View full report in Codecov by Sentry. |
tests/integration/test_db_admin.py
Outdated
# (by checking that the connection string doesn't work anymore). | ||
async with ops_test.fast_forward(): | ||
await ops_test.model.applications[DATABASE_APP_NAME].remove_relation( | ||
f"{DATABASE_APP_NAME}:{RELATION_NAME}", f"{LANDSCAPE_APP_NAME}:{RELATION_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.
f"{DATABASE_APP_NAME}:{RELATION_NAME}", f"{LANDSCAPE_APP_NAME}:{RELATION_NAME}" | |
f"{DATABASE_APP_NAME}:{RELATION_NAME}", f"{LANDSCAPE_APP_NAME}:db" |
The interface on Landscape's side is called db
.
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.
Relation name is db-admin
but the interface on Landscape side is called db
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.
Nice!
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.
Vote back. Linter is not happy: https://github.com/canonical/postgresql-operator/actions/runs/8159411639/job/22388324477
* test_landscape_scalable_bundle_db | add logic for checking users deletion after relation broken * Updated `test_landscape_scalable_bundle_db` test * updated Co-authored-by: Dragomir Penev <6687393+dragomirp@users.noreply.github.com> * fix lint test * updated * updated * updated * updated * updated * updated * updated * updated --------- Co-authored-by: Dragomir Penev <6687393+dragomirp@users.noreply.github.com>
Issue
User should be created on a relation-joined event, and the user should be dropped on a relation-departed event
Solution
Added missed logic for
db_admin
test where checking that user dropped after relation removed