Revert "Test custom RP query param in proxy request"

This reverts commit 388e81b22f.
pull/10616/head
Jared Scheib 2018-04-17 17:44:52 -07:00
parent 57c56607f6
commit c2812cab90
1 changed files with 0 additions and 33 deletions

View File

@ -63,39 +63,6 @@ func Test_Influx_MakesRequestsToQueryEndpoint(t *testing.T) {
} }
} }
func Test_Influx_MakesRequestToQueryEndpointWithCustomRP(t *testing.T) {
t.Parallel()
crp := "pineapple"
ts := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(http.StatusOK)
rw.Write([]byte(`{}`))
u, _ := url.Parse(r.RequestURI)
q := u.Query()
if rp := q.Get("rp"); rp != crp {
t.Fatalf("rp query param: want %s, got: %s", crp, rp)
}
}))
defer ts.Close()
var series chronograf.TimeSeries
series, err := NewClient(ts.URL, log.New(log.DebugLevel))
if err != nil {
t.Fatal("Unexpected error initializing client: err:", err)
}
query := chronograf.Query{
RP: crp,
Command: "SELECT mean(\"usage_user\") FROM cpu WHERE \"cpu\" = 'cpu-total' AND time > now() - 10m GROUP BY host;",
}
_, err = series.Query(context.Background(), query)
if err != nil {
t.Fatal("Expected no error but was", err)
}
}
type MockAuthorization struct { type MockAuthorization struct {
Bearer string Bearer string
Error error Error error