Getting tests to use dummy client

This commit is contained in:
MichaelOultram 2015-08-15 15:57:55 +01:00
parent 644fe0ac24
commit 0383202304

14
test.go
View file

@ -39,14 +39,14 @@ func (t TestSettings) createClient(uname string) *gumble.Client {
} }
func (t TestSettings) testYoutubeSong() { func (t TestSettings) testYoutubeSong() {
// dummyClient := t.createClient("dummy") dummyClient := t.createClient("dummy")
// if err := dummyClient.Connect(); err != nil { if err := dummyClient.Connect(); err != nil {
// panic(err) panic(err)
// } }
dj.client.Request(gumble.RequestUserList) dj.client.Request(gumble.RequestUserList)
time.Sleep(time.Second * 5) time.Sleep(time.Second * 5)
dummyUser := dj.client.Users.Find("BottleOToast") dummyUser := dj.client.Users.Find("dummy")
if dummyUser == nil { if dummyUser == nil {
fmt.Printf("User does not exist, printing users\n") fmt.Printf("User does not exist, printing users\n")
for _, user := range dj.client.Users { for _, user := range dj.client.Users {
@ -76,10 +76,10 @@ func (t TestSettings) testYoutubeSong() {
fmt.Printf("For: %s; Expected: %s; Got: %s\n", url, title, dj.queue.CurrentSong().Title()) fmt.Printf("For: %s; Expected: %s; Got: %s\n", url, title, dj.queue.CurrentSong().Title())
} }
time.Sleep(time.Second * 5) time.Sleep(time.Second * 10)
skip(dummyUser, false, false) skip(dummyUser, false, false)
} }
os.Exit(0) os.Exit(0)
//dummyClient.Disconnect() dummyClient.Disconnect()
} }