InfluxDB output: add tests and a README

This commit is contained in:
Cameron Sparr
2015-11-13 10:39:36 -07:00
parent 20fbfc7006
commit 0f036d6bec
4 changed files with 54 additions and 10 deletions

View File

@@ -1,10 +1,7 @@
package amon
import (
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"reflect"
"testing"
"time"
@@ -22,12 +19,6 @@ var (
)
func TestUriOverride(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(`{"status":"ok"}`)
}))
defer ts.Close()
a := &Amon{
ServerKey: fakeServerKey,
AmonInstance: fakeAmonInstance,