package p4go import ( "fmt" "testing" ) func TestListClientsForUser(t *testing.T) { dao, err := AllocAndConnect("gotest", "commonsadmin", "commonsadmin", "localhost:1666", "testing") if err != nil { t.Errorf("connect failed: %s\n", err.Error()) t.FailNow() } clients, err := dao.ListClientsForUser("user") if err != nil { t.Errorf("list clients failed: %s\n", err.Error()) t.FailNow() } for _, client := range clients { fmt.Printf("client id: %s\n", client["client"]) } }