diff --git a/machine1/dbus.go b/machine1/dbus.go index 79c30ea0..49207eaa 100644 --- a/machine1/dbus.go +++ b/machine1/dbus.go @@ -163,7 +163,7 @@ func (c *Conn) DescribeMachine(name string) (machineProps map[string]interface{} for key, val := range dbusProps { machineProps[key] = val.Value() } - return + return machineProps, nil } // KillMachine sends a signal to a machine diff --git a/machine1/dbus_test.go b/machine1/dbus_test.go index cbf37d1d..bb515d11 100644 --- a/machine1/dbus_test.go +++ b/machine1/dbus_test.go @@ -125,6 +125,14 @@ func TestMachine(t *testing.T) { } for _, v := range machineNames { + props, err := conn.DescribeMachine(v) + if err != nil { + t.Fatal("failed to get machine properties") + } + t.Logf("machine %s properties: %v", v, props) + if len(props) == 0 { + t.Fatalf("no machine properties found for %s", v) + } tErr := conn.TerminateMachine(v) if tErr != nil { t.Fatal(tErr)