-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement cluster size check and loggin addon test case on test_upgrade.py #1485
Implement cluster size check and loggin addon test case on test_upgrade.py #1485
Conversation
We should check whether it is a feature or not. |
Yes, currently it's by design (feature). |
Let's add it as reference with comment in the code. I think I would need to add some docstring to explain the |
@@ -494,6 +499,10 @@ def test_degraded_volume( | |||
3. Immediately upgrade Harvester. | |||
4. Upgrade should fail. | |||
""" | |||
# https://github.com/harvester/harvester/issues/6425 | |||
if cluster_state.size < 3: | |||
pytest.skip(f"Degraded only checked when nodes >= 3, skip for {cluster_state.size}.") |
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.
Typo: Degraded volumes only checked when nodes >= 3 :)
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.
Fixed in 702026f.
Guys, as we on the way of Sorry for inconvenience, no more new item will be add to this PR. :P |
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.
I need to explain how the TestUpgrade
works, then you can know why the implementation need to change.
As the manual test, steps would like:
- Set up environment before upgrade
- Perform upgrade
- Verify the environment is expected
What we do in upgrade automation is,
- test case starts with
test_pre_setup
is going to be executed before upgrade - test case
test_perform_upgrade
will start the upgrade - test case starts with
test_verify
is going to verify the test case (after upgraded) hit criteria
cluster state changes during upgrade will be recorded in cluster_state
. (that's why we will not use it in TestInvalidUpgrade
)
Let's look into the case of setup_logging
, we move logging to addon after v1.2.0
, so we need to consider following cases:
- A upgrade to
v1.2.0
(implemented) >v1.2.0
upgrade to B
When you implement case 2
, you would still need to consider the case 1
in both pre_setup
and verify
.
Verification for 6a19ea8 |
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.
LGTM
Which issue(s) this PR fixes & What it does:
test_upgrade.py::TestInvalidUpgrade::test_degraded_volume
when cluster size < 3.test_preq_setup_logging
TODOrancher-logging
addon status intest_verify_logging_pods
Special notes for your reviewer:
n/a
Additional documentation or context
Verification