kytos-ng / kytos-end-to-end-tests

Kytos End-to-End Tests
0 stars 10 forks source link

e2e test failing: tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically #299

Closed viniarck closed 2 months ago

viniarck commented 2 months ago

It was merged yesterday on PR #297:

The code looks correct, it also performs a sleep and wait for switches to connect before trying to assert, needs some investigation cc'ing @Alopalao:

tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically: 2024-04-17,04:28:32.219585 - 2024-04-17,04:28:32.228130
self = <tests.test_e2e_05_topology.TestE2ETopology object at 0x7f8ccf759ed0>
    def test_515_delete_interface_automatically(self):
        """Test interface removal after logical deletion"""
        intf_id = "00:00:00:00:00:00:00:01:4"
        api_url = KYTOS_API + f'/topology/v3/interfaces'
        response = requests.get(api_url)
        assert response.status_code == 200, response.text
        data = response.json()
>       assert intf_id in data["interfaces"]
E       AssertionError: assert '00:00:00:00:00:00:00:01:4' in {'00:00:00:00:00:00:00:01:1': {'active': True, 'enabled': False, 'id': '00:00:00:00:00:00:00:01:1', 'link': '', ...}, ...0:01:4294967294': {'active': True, 'enabled': False, 'id': '00:00:00:00:00:00:00:01:4294967294', 'link': '', ...}, ...}
tests/test_e2e_05_topology.py:930: AssertionError
tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically: 2024-04-17,04:28:56.683765 - 2024-04-17,04:28:56.692564
=========================== rerun test summary info ============================
RERUN tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically
RERUN tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically
=========================== short test summary info ============================
FAILED tests/test_e2e_05_topology.py::TestE2ETopology::test_515_delete_interface_automatically - AssertionError: assert '00:00:00:00:00:00:00:01:4' in {'00:00:00:00:00:00:00:01:1': {'active': True, 'enabled': False, 'id': '00:00:00:00:00:00:00:01:1', 'link': '', ...}, ...0:01:4294967294': {'active': True, 'enabled': False, 'id': '00:00:00:00:00:00:00:01:4294967294', 'link': '', ...}, ...}
= 1 failed, 238 passed, 8 skipped, 9 xfailed, 7 xpassed, 1143 warnings, 2 rerun in 12275.20s (3:24:35) =
Alopalao commented 2 months ago

We may want to use a separate file and a bigger topology for all deletion and disabling tests. Bigger topology to play around with deleted links, interfaces, switches and the tests do not interrupt each other processes. I am gonna do a little PR for this.