Revert "Test custom RP query param in proxy request"
This reverts commit 388e81b22f
.
pull/10616/head
parent
57c56607f6
commit
c2812cab90
|
@ -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 {
|
||||
Bearer string
|
||||
Error error
|
||||
|
|
Loading…
Reference in New Issue