github.com/SUSE/skuba@v1.4.17/ci/infra/testrunner/tests/test_upgrade_plan_from_previous_with_upgraded_control_plane.py (about) 1 import pytest 2 3 from tests.utils import PREVIOUS_VERSION, CURRENT_VERSION, node_is_ready, node_is_upgraded 4 5 6 @pytest.mark.disruptive 7 def test_upgrade_plan_from_previous_with_upgraded_control_plane(deployment, skuba, kubectl, platform): 8 """ 9 Starting from an updated control plane, check what cluster/node plan report. 10 """ 11 12 masters = platform.get_num_nodes("master") 13 for n in range(0, masters): 14 assert node_is_ready(platform, kubectl, "master", n) 15 master = skuba.node_upgrade("apply", "master", n) 16 assert master.find("successfully upgraded") != -1 17 assert node_is_upgraded(kubectl, platform, "master", n) 18 19 workers = platform.get_num_nodes("worker") 20 for n in range(0, workers): 21 worker = skuba.node_upgrade("plan", "worker", n) 22 assert worker.find( 23 "Current Kubernetes cluster version: {pv}".format(pv=PREVIOUS_VERSION)) 24 assert worker.find("Latest Kubernetes version: {cv}".format( 25 cv=CURRENT_VERSION)) != -1 26 assert worker.find(" - kubelet: {pv} -> {cv}".format( 27 pv=PREVIOUS_VERSION, cv=CURRENT_VERSION)) != -1