package dbus
import "testing"
func TestNM(t *testing.T) {
s, _ := SystemBus()
var paths []ObjectPath
s.Object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager/Settings").Call("org.freedesktop.NetworkManager.Settings.ListConnections", 0).Store(&paths)
for _, p := range paths {
o := s.Object("org.freedesktop.NetworkManager", p)
c := o.Call("org.freedesktop.NetworkManager.Settings.Connection.GetSettings", 0)
if c.Err != nil {
t.Error(c.Err)
}
}
}
I can sure whether everyone will failed , but dbus-send or d-feet call this method will be ok.
(and I have 12 connections, two of them is ok, and others is failed)
If you can't find an failed, you can try create more new connections with nm-connection-editor.
test with this
I can sure whether everyone will failed , but dbus-send or d-feet call this method will be ok. (and I have 12 connections, two of them is ok, and others is failed)
If you can't find an failed, you can try create more new connections with nm-connection-editor.
--- FAIL: TestNM (0.00 seconds) nm_test.go:14: dbus: wire format error: unexpected EOF