Skip to content
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

Merged
merged 14 commits into from
Mar 14, 2024

Conversation

TakoB222
Copy link
Contributor

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

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 62.96296% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 80.83%. Comparing base (f843b52) to head (d04ff94).
Report is 23 commits behind head on main.

Files Patch % Lines
src/charm.py 62.96% 7 Missing and 3 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

# (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}"
Copy link
Contributor

@dragomirp dragomirp Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor

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

TakoB222 and others added 2 commits March 5, 2024 18:10
Co-authored-by: Dragomir Penev <6687393+dragomirp@users.noreply.github.com>
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@delgod delgod merged commit cb6143b into canonical:main Mar 14, 2024
47 checks passed
BON4 pushed a commit to BON4/postgresql-operator that referenced this pull request Apr 23, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants