From ca988c8cb447aa7e328649a0913fc4e973649526 Mon Sep 17 00:00:00 2001
From: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
Date: Tue, 23 Apr 2024 10:33:52 +0200
Subject: [PATCH] Drop native multinode test

We do have molecule tests that also spawn multiple containers and perform
multi-node tests. Let's save some infra resources and won't do multi-node
setups with zuul jobs.
Moreover, such jobs tend to fail intermittently due to connection issues
between some nodes. So they are not very reliable on top of everything.

Change-Id: I482c133e914bd725c5233a7546bafe728d4376f4
---
 .zuul.yaml                | 24 ------------
 tests/host_vars/primary   | 21 -----------
 tests/host_vars/secondary |  9 -----
 tests/test.yml            | 78 ---------------------------------------
 4 files changed, 132 deletions(-)
 delete mode 100644 tests/host_vars/primary
 delete mode 100644 tests/host_vars/secondary
 delete mode 100644 tests/test.yml

diff --git a/.zuul.yaml b/.zuul.yaml
index 5af297b..7cf5f83 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,27 +1,5 @@
 ---
 
-- nodeset:
-    name: debian-bookworm-2-node
-    nodes:
-      - name: primary
-        label: debian-bookworm
-      - name: secondary
-        label: debian-bookworm
-    groups:
-      - name: switch
-        nodes:
-          - primary
-      - name: peers
-        nodes:
-          - primary
-          - secondary
-
-- job:
-    name: ffrouting-deploy
-    parent: base
-    run: tests/test.yml
-    nodeset: debian-bookworm-2-node
-
 - job:
     name: tox-molecule-buster
     parent: tox-molecule
@@ -43,14 +21,12 @@
 - project:
     check:
       jobs:
-        - ffrouting-deploy
         - tox-linters
         - tox-molecule-buster
         - tox-molecule-bookworm
         - tox-molecule-jammy
     gate:
       jobs:
-        - ffrouting-deploy
         - tox-linters
         - tox-molecule-buster
         - tox-molecule-bookworm
diff --git a/tests/host_vars/primary b/tests/host_vars/primary
deleted file mode 100644
index bed6750..0000000
--- a/tests/host_vars/primary
+++ /dev/null
@@ -1,21 +0,0 @@
-frr_vlans:
-  - vlan-raw-device: "{{ ansible_default_ipv4.interface }}"
-    id: 100
-    address: 192.168.1.100
-    netmask: 255.255.255.0
-    network: 192.168.1.0
-    broadcast: 192.168.1.255
-
-frr_staticd_routes:
-  - ip route 10.0.0.0/24 192.168.1.10
-
-frr_bgpd_config:
-  - router bgp 1234
-  - "bgp router-id {{ hostvars['primary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }}"
-  - "neighbor {{ hostvars['secondary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }} remote-as 5678"
-  - network 192.168.1.0/24
-  - address-family ipv4 unicast
-  - "  neighbor {{ hostvars['secondary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }} prefix-list pl-allowed-adv out"
-  - "exit-address-family"
-  - ip prefix-list pl-allowed-adv seq 5 permit 192.168.1.0/24
-  - ip prefix-list pl-allowed-adv seq 10 deny any
diff --git a/tests/host_vars/secondary b/tests/host_vars/secondary
deleted file mode 100644
index be3c356..0000000
--- a/tests/host_vars/secondary
+++ /dev/null
@@ -1,9 +0,0 @@
-frr_bgpd_config:
-  - router bgp 5678
-  - "bgp router-id {{ hostvars['secondary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }}"
-  - "neighbor {{ hostvars['primary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }} remote-as 1234"
-  - address-family ipv4 unicast
-  - "  neighbor {{ hostvars['primary']['ansible_' ~ bridge_name | replace('-', '_')]['ipv4']['address'] }} prefix-list pl-allowed-adv in"
-  - exit-address-family
-  - ip prefix-list pl-allowed-adv seq 5 permit 192.168.1.0/24
-  - ip prefix-list pl-allowed-adv seq 10 deny any
diff --git a/tests/test.yml b/tests/test.yml
deleted file mode 100644
index 060f1a6..0000000
--- a/tests/test.yml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-# Copyright 2020, VEXXHOST, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-- name: Installing frr
-  hosts: all
-  vars:
-    bridge_name: br-infra
-
-  roles:
-    - multi-node-bridge
-    - clear-firewall
-    - frrouting
-
-  post_tasks:
-    - name: Wait after service restart
-      pause:
-        seconds: 10
-
-    - name: Ping vlans ip address
-      shell: |
-        set -e
-        ping -c2 "{{ item.address }}"
-      changed_when: false
-      register: _ping_vlan
-      until: _ping_vlan is success
-      retries: 5
-      delay: 10
-      with_items: "{{ frr_vlans }}"
-      when: inventory_hostname == 'primary'
-
-    - name: Check service state
-      service_facts:
-
-    - name: Fail if frr is down
-      fail:
-        msg: frr is not up
-      when: ansible_facts.services['frr'].state != 'running'
-
-    - name: Get summary
-      become: true
-      become_user: root
-      command: "vtysh -c 'show bgp summary'"
-      register: _frr_get_summary
-      changed_when: false
-
-    - name: Get routes
-      become: true
-      become_user: root
-      command: "vtysh -c 'show ip route'"
-      register: _frr_get_routes
-      changed_when: false
-
-    - name: Fail if we're missing static routes
-      fail:
-        msg: "We can't find route {{ item }}"
-      with_items: "{{ frr_staticd_routes }}"
-      when:
-        - inventory_hostname == 'primary'
-        - item.split(' ')[-1] not in _frr_get_routes.stdout
-
-    - name: Fail if we're missing bgp routes
-      fail:
-        msg: "We can't find route 192.168.1.0/24"
-      when:
-        - inventory_hostname == 'secondary'
-        - "'192.168.1.0/24' not in _frr_get_routes.stdout"