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

Conform new upgradelog naming and check before create upgrade #1785

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Check upgradelog pod and volume
  • Loading branch information
albinsun committed Jan 15, 2025
commit da7544913212c916df9bf3f9b26b9d8decf46948
24 changes: 24 additions & 0 deletions harvester_e2e_tests/integrations/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,30 @@ def test_verify_crds_existed(self, api_client, harvester_crds):
if not exist_crds:
raise AssertionError(f"CRDs {not_existed_crds} are not existed")

@pytest.mark.dependency(depends=["any_nodes_upgrade"])
def test_verify_upgradelog(self, api_client):
""" Verify upgradelog pod and volume existed when upgrade with "Enable Logging"
"""
# pod
code, data = api_client.get_pods(namespace='harvester-system')
assert code == 200 and data['data'], (code, data)

upgradelog_pods = [pod for pod in data['data'] if 'upgradelog' in pod['id']]
assert upgradelog_pods, f"No upgradelog pod found:\n{data['data']}"
for pod in upgradelog_pods:
assert pod["status"]["phase"] == "Running", (code, upgradelog_pods)

# volume
code, data = api_client.volumes.get(namespace='harvester-system')
assert code == 200 and data['data'], (code, data)

upgradelog_vols = [vol for vol in data['data'] if 'upgradelog' in vol['id']]
assert upgradelog_vols, f"No upgradelog volume found:\n{data['data']}"
for vol in upgradelog_vols:
assert not vol["metadata"]['state']['error'], (code, upgradelog_vols)
assert not vol["metadata"]['state']['transitioning'], (code, upgradelog_vols)
assert vol['status']['phase'] == "Bound", (code, upgradelog_vols)

@pytest.mark.dependency(depends=["any_nodes_upgrade"])
def test_upgrade_vm_deleted(self, api_client, wait_timeout):
# max to wait 300s for the upgrade related VMs to be deleted
Expand Down
Loading