From c53130d3e339c536308cb2301852bf2cf39ccc59 Mon Sep 17 00:00:00 2001 From: roverflow Date: Mon, 18 Nov 2024 15:52:25 +0530 Subject: [PATCH] fix deleted test --- .../tests/common/deleted.yaml | 4 +- .../nxos_vrf_address_family/vars/main.yaml | 42 ++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/nxos_vrf_address_family/tests/common/deleted.yaml b/tests/integration/targets/nxos_vrf_address_family/tests/common/deleted.yaml index 551c5fdd7..c11ceb032 100644 --- a/tests/integration/targets/nxos_vrf_address_family/tests/common/deleted.yaml +++ b/tests/integration/targets/nxos_vrf_address_family/tests/common/deleted.yaml @@ -52,12 +52,12 @@ - name: Assert that before dicts are correctly generated ansible.builtin.assert: that: - - "{{ general['after'] | symmetric_difference(res_before['before']) | length == 0 }}" + - "{{ general['after'] | symmetric_difference(result['before']) | length == 0 }}" - name: Assert that after dicts are correctly generated ansible.builtin.assert: that: - - deleted['after'] == res_after['after'] + - deleted['after'] == result['after'] - name: Delete provided VRF global (idempotent) register: result diff --git a/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml b/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml index 818f19206..cd809545f 100644 --- a/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml +++ b/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml @@ -1,4 +1,26 @@ --- +general: + after: + - address_families: + - afi: ipv4 + export: + - map: "22" + - vrf: + allow_vpn: true + map_import: "44" + - vrf: + allow_vpn: true + maximum: + max_route_options: + threshold: + reinstall_threshold: 44 + threshold_value: 22 + max_routes: 900 + route_target: + - import: "64512:200" + - export: "64512:200" + safi: unicast + name: VRF1 merged: after: - address_families: @@ -48,7 +70,25 @@ merged: - import vrf default map 44 advertise-vpn - import vrf advertise-vpn deleted: - commands: [] + after: + - address_families: + - afi: ipv4 + export: + - vrf: + allow_vpn: true + map_import: "44" + - vrf: + allow_vpn: true + route_target: + - export: "64512:200" + safi: unicast + name: VRF1 + commands: + - vrf context VRF1 + - address-family ipv4 unicast + - no maximum routes 900 22 reinstall 44 + - no route-target import 64512:200 + - no export map 22 gathered: - name: VRF1 address_families: