From 4852b5c11ed1cae2bbc3cd6f7bbfc146ea15b838 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Fri, 11 Dec 2015 13:09:09 -0700 Subject: [PATCH] Do not rely on external server for amon unit tests --- outputs/amon/amon_test.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/outputs/amon/amon_test.go b/outputs/amon/amon_test.go index d694323c8..a220a304d 100644 --- a/outputs/amon/amon_test.go +++ b/outputs/amon/amon_test.go @@ -9,37 +9,8 @@ import ( "github.com/influxdb/telegraf/testutil" "github.com/influxdb/influxdb/client/v2" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) -var ( - fakeServerKey = "123456" - fakeAmonInstance = "https://demo.amon.cx" -) - -func TestUriOverride(t *testing.T) { - a := &Amon{ - ServerKey: fakeServerKey, - AmonInstance: fakeAmonInstance, - } - - err := a.Connect() - require.NoError(t, err) - err = a.Write(testutil.MockBatchPoints().Points()) - require.NoError(t, err) -} - -func TestAuthenticatedUrl(t *testing.T) { - a := &Amon{ - ServerKey: fakeServerKey, - AmonInstance: fakeAmonInstance, - } - - authUrl := a.authenticatedUrl() - assert.EqualValues(t, fmt.Sprintf("%s/api/system/%s", fakeAmonInstance, fakeServerKey), authUrl) -} - func TestBuildPoint(t *testing.T) { var tagtests = []struct { ptIn *client.Point