Skip to content

Commit

Permalink
test(unit): Removed useless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Jimenez committed Feb 18, 2016
1 parent 29c671c commit c8365b3
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions plugins/inputs/mesos/mesos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"
"net/http/httptest"
"os"
"reflect"
"testing"

"github.com/influxdata/telegraf/testutil"
Expand Down Expand Up @@ -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)
}
}

0 comments on commit c8365b3

Please sign in to comment.