Merging upstream version 1.1.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 11:54:55 +01:00
parent 50f8dbf7e8
commit 2044ea6182
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
196 changed files with 10121 additions and 3780 deletions

View file

@ -8,7 +8,7 @@ from __future__ import annotations
from typing import Any
from anta.tests.connectivity import VerifyLLDPNeighbors, VerifyReachability
from tests.lib.anta import test # noqa: F401; pylint: disable=W0611
from tests.units.anta_tests import test
DATA: list[dict[str, Any]] = [
{
@ -99,6 +99,28 @@ DATA: list[dict[str, Any]] = [
],
"expected": {"result": "success"},
},
{
"name": "success-df-bit-size",
"test": VerifyReachability,
"inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0", "repeat": 5, "size": 1500, "df_bit": True}]},
"eos_data": [
{
"messages": [
"""PING 10.0.0.1 (10.0.0.1) from 172.20.20.6 : 1472(1500) bytes of data.
1480 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.085 ms
1480 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.020 ms
1480 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.019 ms
1480 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.018 ms
1480 bytes from 10.0.0.1: icmp_seq=5 ttl=64 time=0.017 ms
--- 10.0.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.017/0.031/0.085/0.026 ms, ipg/ewma 0.061/0.057 ms""",
],
},
],
"expected": {"result": "success"},
},
{
"name": "failure-ip",
"test": VerifyReachability,
@ -167,6 +189,28 @@ DATA: list[dict[str, Any]] = [
],
"expected": {"result": "failure", "messages": ["Connectivity test failed for the following source-destination pairs: [('Management0', '10.0.0.11')]"]},
},
{
"name": "failure-size",
"test": VerifyReachability,
"inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0", "repeat": 5, "size": 1501, "df_bit": True}]},
"eos_data": [
{
"messages": [
"""PING 10.0.0.1 (10.0.0.1) from 172.20.20.6 : 1473(1501) bytes of data.
ping: local error: message too long, mtu=1500
ping: local error: message too long, mtu=1500
ping: local error: message too long, mtu=1500
ping: local error: message too long, mtu=1500
ping: local error: message too long, mtu=1500
--- 10.0.0.1 ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 40ms
""",
],
},
],
"expected": {"result": "failure", "messages": ["Connectivity test failed for the following source-destination pairs: [('Management0', '10.0.0.1')]"]},
},
{
"name": "success",
"test": VerifyLLDPNeighbors,