From b44a731d04317e6d6457245cd33f25c3798e4c5a Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Fri, 13 Dec 2024 09:06:52 +0100 Subject: [PATCH] CI: Remove Flatcar specifics We don't test Flatcar at all in CI, thus remove special handling for it. --- tests/testcases/015_check-nodes-ready.yml | 12 ++---------- tests/testcases/020_check-pods-running.yml | 12 ++---------- tests/testcases/030_check-network.yml | 12 ++---------- tests/testcases/040_check-network-adv.yml | 11 +---------- 4 files changed, 7 insertions(+), 40 deletions(-) diff --git a/tests/testcases/015_check-nodes-ready.yml b/tests/testcases/015_check-nodes-ready.yml index 778417f10a0..536207211bf 100644 --- a/tests/testcases/015_check-nodes-ready.yml +++ b/tests/testcases/015_check-nodes-ready.yml @@ -1,18 +1,10 @@ --- - name: Testcases checking nodes hosts: kube_control_plane[0] + vars: + bin_dir: /usr/local/bin tasks: - - name: Force binaries directory for Flatcar Container Linux by Kinvolk - set_fact: - bin_dir: "/opt/bin" - when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - - name: Force binaries directory for other hosts - set_fact: - bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - import_role: # noqa name[missing] name: cluster-dump diff --git a/tests/testcases/020_check-pods-running.yml b/tests/testcases/020_check-pods-running.yml index f25e2b7a46f..a573bb1cc7c 100644 --- a/tests/testcases/020_check-pods-running.yml +++ b/tests/testcases/020_check-pods-running.yml @@ -1,18 +1,10 @@ --- - name: Testcases checking pods hosts: kube_control_plane[0] + vars: + bin_dir: /usr/local/bin tasks: - - name: Force binaries directory for Flatcar Container Linux by Kinvolk - set_fact: - bin_dir: "/opt/bin" - when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - - name: Force binaries directory for other hosts - set_fact: - bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - import_role: # noqa name[missing] name: cluster-dump diff --git a/tests/testcases/030_check-network.yml b/tests/testcases/030_check-network.yml index 7c5058a9f02..35717e0cfa8 100644 --- a/tests/testcases/030_check-network.yml +++ b/tests/testcases/030_check-network.yml @@ -4,17 +4,9 @@ vars: test_image_repo: registry.k8s.io/e2e-test-images/agnhost test_image_tag: "2.40" + bin_dir: "/usr/local/bin" tasks: - - name: Force binaries directory for Flatcar Container Linux by Kinvolk - set_fact: - bin_dir: "/opt/bin" - when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - - name: Force binaries directory for other hosts - set_fact: - bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Check kubelet serving certificates approved with kubelet_csr_approver when: @@ -102,7 +94,7 @@ - name: Check that all pods are running and ready vars: - pods: "{{ (pods_json | from_json)['items'] }}" + pods: "{{ (pods_json.stdout | from_json)['items'] }}" block: - name: Check Deployment is ready command: "{{ bin_dir }}/kubectl rollout status deploy --namespace test agnhost --timeout=180s" diff --git a/tests/testcases/040_check-network-adv.yml b/tests/testcases/040_check-network-adv.yml index f9f21a73bfa..091025b13a4 100644 --- a/tests/testcases/040_check-network-adv.yml +++ b/tests/testcases/040_check-network-adv.yml @@ -19,18 +19,9 @@ agent_report_interval: 10 netcheck_namespace: default netchecker_port: 31081 + bin_dir: "/usr/local/bin" tasks: - - name: Force binaries directory for Container Linux by CoreOS and Flatcar - set_fact: - bin_dir: "/opt/bin" - when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - - name: Force binaries directory on other hosts - set_fact: - bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - - import_role: # noqa name[missing] name: cluster-dump