-
Notifications
You must be signed in to change notification settings - Fork 27
Add kill db process test #35
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #35 +/- ##
==========================================
+ Coverage 60.11% 60.32% +0.20%
==========================================
Files 6 6
Lines 692 809 +117
Branches 103 119 +16
==========================================
+ Hits 416 488 +72
- Misses 256 293 +37
- Partials 20 28 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
.github/workflows/release.yaml
Outdated
- name: Run integration tests | ||
run: tox -e db-admin-relation-integration | ||
|
||
integration-test-ha-self-healing-rotation: |
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.
In the release pipeline you could call the CI with the following code:
# release.yaml
jobs:
test/ci/whatever you want to call this part:
uses: ./.github/workflows/ci.yaml
# ci.yaml
on:
workflow_call:
This way, you only have to write these test runs out once.
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.
Amazing suggestion! I updated that on 5aaf4bc.
# Deploy the continuous writes application charm if it wasn't already deployed. | ||
async with ops_test.fast_forward(): | ||
if await app_name(ops_test, APPLICATION_NAME) is None: | ||
charm = await ops_test.build_charm("tests/integration/ha_tests/application-charm") |
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.
Perhaps these test application-charm
s could be renamed to be more descriptive? not essential for this PR though.
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.
Good suggestion! I created a ticket for that on Jira.
* Add kill db process test * Change timeout * Ignore PyCharm folder and LXD profile file * Add continuous writes test charm * Improve workflow files
Issue
Solution
Context
app_name
helper function).master_start_timeout
fixture runs the continuous writes test charm that was merged on Add continuous writes test charm #36 and now is used to ensure the database is healthy after each shakedown test.master_start_timeout
fixture is used to speed up the fail-over process when the DB process is killed in the former primary.Testing
tests/integration/ha_tests/test_self_healing.py
. It tests the charm in a very similar way the Charmed MongoDB Operator is tested.Release Notes