ansible-collections / cisco.iosxr

Ansible Network Collection for Cisco IOSXR
GNU General Public License v3.0
69 stars 48 forks source link

iosxr_l3_interfaces:Integration test issue :Assertion failed #356

Closed komaldesai13 closed 1 year ago

komaldesai13 commented 1 year ago
SUMMARY

When running iosxr_l3_interfaces integration tests from Controller with EE container, We get an unexpected error: Assertion Failed On task Assert that after dict is correctly generated

ISSUE TYPE
COMPONENT NAME

cisco.iosxr.iosxr_l3_interfaces

ANSIBLE VERSION

2.14

COLLECTION VERSION

cisco.iosxr 4.0.3

CONFIGURATION

None

OS / ENVIRONMENT
STEPS TO REPRODUCE

Run integration iosxr_l3_interfaces test, the following task failed. See below the actual results.

EXPECTED RESULTS

The task will pass with not errors.

ACTUAL RESULTS

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces : Delete attributes of all configured interfaces] *** task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml:10 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr changed: [10.0.149.88] => { "after": [ { "name": "Loopback888" }, { "name": "Loopback999" } ], "before": [ { "name": "Loopback888" }, { "name": "Loopback999" }, { "ipv4": [ { "address": "198.51.100.1/24" } ], "ipv6": [ { "address": "2001:db8::/32" } ], "name": "GigabitEthernet0/0/0/0" }, { "ipv4": [ { "address": "192.0.2.1/24" }, { "address": "192.0.2.2/24", "secondary": true } ], "name": "GigabitEthernet0/0/0/1" } ], "changed": true, "commands": [ "interface GigabitEthernet0/0/0/0", "no ipv4 address", "no ipv6 address", "interface GigabitEthernet0/0/0/1", "no ipv4 address" ], "invocation": { "module_args": { "config": [ { "ipv4": null, "ipv6": null, "name": "GigabitEthernet0/0/0/0" }, { "ipv4": null, "ipv6": null, "name": "GigabitEthernet0/0/0/1" } ], "running_config": null, "state": "deleted" } } }

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces : Assert that correct set of commands were generated] *** task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml:19 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr ok: [10.0.149.88] => { "changed": false, "msg": "All assertions passed" }

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces : Assert that before dicts are correctly generated] *** task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml:24 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr ok: [10.0.149.88] => { "changed": false, "msg": "All assertions passed" }

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces : Assert that after dict is correctly generated] *** task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml:29 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr fatal: [10.0.149.88]: FAILED! => { "assertion": false, "changed": false, "evaluated_to": false, "msg": "Assertion failed" }

komaldesai13 commented 1 year ago

Found Similar issue for L2 Interface as well.

TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces : Delete layer 2 interfaces attributes of all configured interfaces] task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml:10 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr changed: [10.0.149.88] => { "after": [ { "name": "GigabitEthernet0/0/0/3.900" } ], "before": [ { "l2protocol": [ { "cpsv": "tunnel" } ], "l2transport": true, "name": "GigabitEthernet0/0/0/1", "propagate": true }, { "encapsulation": { "dot1q": 40, "second_dot1q": 60 }, "name": "GigabitEthernet0/0/0/3.900" }, { "l2protocol": [ { "cpsv": "tunnel" } ], "l2transport": true, "name": "GigabitEthernet0/0/0/4" } ], "changed": true, "commands": [ "interface GigabitEthernet0/0/0/1", "no l2transport", "interface GigabitEthernet0/0/0/3.900", "no encapsulation dot1q", "interface GigabitEthernet0/0/0/4", "no l2transport" ], "invocation": { "module_args": { "config": null, "running_config": null, "state": "deleted" } } } TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces : Assert that correct set of commands were generated] task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml:15 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr ok: [10.0.149.88] => { "changed": false, "msg": "All assertions passed" } TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces : Assert that before dicts are correctly generated] task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml:20 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr ok: [10.0.149.88] => { "changed": false, "msg": "All assertions passed" } TASK [/usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces : Assert that after dict is correctly generated] task path: /usr/share/ansible/collections/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml:25 redirecting (type: terminal) ansible.builtin.iosxr to cisco.iosxr.iosxr redirecting (type: cliconf) ansible.builtin.iosxr to cisco.iosxr.iosxr fatal: [10.0.149.88]: FAILED! => { "assertion": false, "changed": false, "evaluated_to": false, "msg": "Assertion failed" }