test(unit): Removed useless tests

This commit is contained in:
Sergio Jimenez 2016-02-11 18:55:00 +01:00 committed by Michele Fadda
parent 46f2aaaa2a
commit 49e5984872
1 changed files with 0 additions and 40 deletions

View File

@ -6,7 +6,6 @@ import (
"net/http"
"net/http/httptest"
"os"
"reflect"
"testing"
"github.com/influxdata/telegraf/testutil"
@ -117,42 +116,3 @@ func TestRemoveGroup(t *testing.T) {
}
}
}
func TestMasterBlocks(t *testing.T) {
a := "wrong_key"
expect := []string{}
got := masterBlocks(a)
if !reflect.DeepEqual(got, expect) {
t.Errorf("Expected empty string slice, got: %v", got)
}
}
func TestSampleConfig(t *testing.T) {
expect := `
# Timeout, in ms.
timeout = 100
# A list of Mesos masters. e.g. master1:5050, master2:5080, etc.
# The port can be skipped if using the default (5050)
# Default value is localhost:5050.
masters = ["localhost:5050"]
# Metrics groups to be collected.
# Default, all enabled.
master_collections = ["resources","master","system","slaves","frameworks","messages","evqueue","registrar"]
`
got := new(Mesos).SampleConfig()
if expect != got {
t.Errorf("Got %s", got)
}
}
func TestDescription(t *testing.T) {
expect := "Telegraf plugin for gathering metrics from N Mesos masters"
got := new(Mesos).Description()
if expect != got {
t.Errorf("Got %s", got)
}
}