Fix several bugs in minecraft input (#2970)

This commit is contained in:
Adam Perlin
2017-06-27 13:14:07 -07:00
committed by Daniel Nelson
parent f2bb4acd4a
commit cc3d420551
6 changed files with 100 additions and 14 deletions

View File

@@ -161,7 +161,7 @@ type MockClient struct {
Err error
}
func (m *MockClient) Gather() ([]string, error) {
func (m *MockClient) Gather(d RCONClientProducer) ([]string, error) {
return m.Result, m.Err
}
@@ -178,13 +178,19 @@ func TestGather(t *testing.T) {
},
Err: nil,
},
clientSet: true,
}
err := testConfig.Gather(&acc)
if err != nil {
t.Fatalf("gather returned error. Error: %s\n", err)
}
if !testConfig.clientSet {
t.Fatalf("clientSet should be true, client should be set")
}
tags := map[string]string{
"player": "divislight",
"server": "biffsgang.net:25575",