Skip to content

Needs updating for NetworkManager 1.49.3 secret agent #216

@martinpitt

Description

@martinpitt

Since this NM commit (1.49.2 → 1.49.3), test_one_wifi_with_accesspoints test hangs. nmcli expects a secret agent, for which the current mock doesn't provide integration.

A convenient way to investigate this is

--- tests/test_networkmanager.py
+++ tests/test_networkmanager.py
@@ -172,7 +172,9 @@ class TestNetworkManager(dbusmock.DBusTestCase):
         self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+--")
 
         # connect to existing wifi with password
-        subprocess.check_call(["nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"])
+        print(' '.join(["nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"]))
+        subprocess.check_call(["bash", "-i"])
+        # subprocess.check_call(["timeout", "--signal=KILL", "5", "nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"])
         self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+AP_3")
 
         # connect to existing wifi without password

and then running pytest -svvk test_one_wifi_with_accesspoints. It'll set up the NM mock and give you a shell, where

 nmcli dev wifi connect AP_3 password s3kr1t

hangs.

But neither busctl monitor nor strace tell me what exactly nmcli is trying to do when it hangs.

@thom311 @lkundrak would you have some hints for me how I need to extend the NM mock to get along with this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions