Fixing build errors
This commit is contained in:
parent
77723f4941
commit
fb16dc1db3
12
circle.yml
12
circle.yml
|
@ -12,12 +12,12 @@ dependencies:
|
||||||
- make
|
- make
|
||||||
- make install
|
- make install
|
||||||
cache_directories:
|
cache_directories:
|
||||||
- "$HOME/opus"
|
- "opus"
|
||||||
- "$HOME/bin"
|
- "bin"
|
||||||
- "$HOME/gopath/bin"
|
- "gopath/bin"
|
||||||
- "$HOME/gopath/pkg"
|
- "gopath/pkg"
|
||||||
- "$HOME/gopath/src/github.com/nitrous-io"
|
- "gopath/src/github.com/nitrous-io"
|
||||||
- "$HOME/gopath/src/github.com/MichaelOultram/mumbledj/.vendor"
|
- "gopath/src/github.com/MichaelOultram/mumbledj/.vendor"
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
||||||
|
|
15
main.go
15
main.go
|
@ -193,7 +193,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var address, port, username, password, channel, pemCert, pemKey, accesstokens string
|
var address, port, username, password, channel, pemCert, pemKey, accesstokens string
|
||||||
var insecure, verbose, test bool
|
var insecure, verbose, testcode bool
|
||||||
|
|
||||||
flag.StringVar(&address, "server", "localhost", "address for Mumble server")
|
flag.StringVar(&address, "server", "localhost", "address for Mumble server")
|
||||||
flag.StringVar(&port, "port", "64738", "port for Mumble server")
|
flag.StringVar(&port, "port", "64738", "port for Mumble server")
|
||||||
|
@ -205,7 +205,7 @@ func main() {
|
||||||
flag.StringVar(&accesstokens, "accesstokens", "", "list of access tokens for channel auth")
|
flag.StringVar(&accesstokens, "accesstokens", "", "list of access tokens for channel auth")
|
||||||
flag.BoolVar(&insecure, "insecure", false, "skip certificate checking")
|
flag.BoolVar(&insecure, "insecure", false, "skip certificate checking")
|
||||||
flag.BoolVar(&verbose, "verbose", false, "[debug] prints out debug messages to the console")
|
flag.BoolVar(&verbose, "verbose", false, "[debug] prints out debug messages to the console")
|
||||||
flag.BoolVar(&test, "test", false, "[debug] tests the features of mumbledj")
|
flag.BoolVar(&testcode, "test", false, "[debug] tests the features of mumbledj")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
dj.config = gumble.Config{
|
dj.config = gumble.Config{
|
||||||
|
@ -247,6 +247,12 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if testcode {
|
||||||
|
Verbose("Testing is enabled")
|
||||||
|
Test(password, address, port)
|
||||||
|
kill()
|
||||||
|
}
|
||||||
|
|
||||||
web = NewWebServer(9563)
|
web = NewWebServer(9563)
|
||||||
web.makeWeb()
|
web.makeWeb()
|
||||||
|
|
||||||
|
@ -255,9 +261,4 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
<-dj.keepAlive
|
<-dj.keepAlive
|
||||||
|
|
||||||
if test {
|
|
||||||
Test(password, address, port)
|
|
||||||
kill()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
3
test.go
3
test.go
|
@ -32,7 +32,8 @@ func (t TestSettings) createClient(uname string) *gumble.Client {
|
||||||
func (t TestSettings) testYoutubeSong() {
|
func (t TestSettings) testYoutubeSong() {
|
||||||
dummyClient := t.createClient("dummy")
|
dummyClient := t.createClient("dummy")
|
||||||
dummyClient.Connect()
|
dummyClient.Connect()
|
||||||
dummyUser := dj.client.Users.Find("dummy")
|
time.Sleep(time.Second * 5) // Give dummy time to connect
|
||||||
|
dummyUser := dj.client.Users.Find("dummy") // May be nil
|
||||||
|
|
||||||
// Don't judge, I used the (autogenerated) Top Tracks for United Kingdom playlist
|
// Don't judge, I used the (autogenerated) Top Tracks for United Kingdom playlist
|
||||||
songs := map[string]string{
|
songs := map[string]string{
|
||||||
|
|
Reference in a new issue