From 6b4daa210f49ddfc90b4ea794751b7a2b7fe3a0c Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Sat, 27 Jun 2026 13:34:09 +0200 Subject: [PATCH] support/testing: TestPythonPy3NetworkmanagerGoi: check we actually get data The sample script would've passed even if the connections list was empty. Check that there is at least one connection, and that the sample script can read loopback device information. Signed-off-by: Fiona Klute Signed-off-by: Romain Naour (cherry picked from commit f38f5bb5939fc3fe896ace714182e2ed8d8c0a2f) Signed-off-by: Thomas Perale --- .../tests/package/sample_python_networkmanager_goi.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/support/testing/tests/package/sample_python_networkmanager_goi.py b/support/testing/tests/package/sample_python_networkmanager_goi.py index 240e8437fd..dff68e66f9 100644 --- a/support/testing/tests/package/sample_python_networkmanager_goi.py +++ b/support/testing/tests/package/sample_python_networkmanager_goi.py @@ -24,3 +24,11 @@ for c in connections: print("{}:".format(c.get_id())) c.for_each_setting_value(print_values, None) print("\n") +print("found {} defined connections".format(len(connections))) +assert len(connections) > 0 + +# check that we can find the loopback device ... +loopback = client.get_device_by_iface("lo") +# ... and read its type and status as expected +assert loopback.get_device_type().name == "LOOPBACK" +assert loopback.get_state().name == "ACTIVATED"