Skip to content

Commit

Permalink
Applied gofmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
pawarpranav83 committed Dec 23, 2023
1 parent 9ecb5c7 commit a76e576
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions test/e2e/query_frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/prometheus/prometheus/model/timestamp"
"github.com/prometheus/prometheus/prompb"


"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/cacheutil"
"github.com/thanos-io/thanos/pkg/promclient"
Expand All @@ -44,7 +43,7 @@ func TestQueryFrontend(t *testing.T) {
t.Cleanup(e2ethanos.CleanScenario(t, e))

now := time.Date(2023, time.December, 22, 12, 0, 0, 0, time.UTC)
tempfn := func () time.Time { return now }
tempfn := func() time.Time { return now }

i := e2ethanos.NewReceiveBuilder(e, "ingestor-rw").WithIngestionEnabled().Init()
testutil.Ok(t, e2e.StartAndWaitReady(i))
Expand All @@ -55,7 +54,7 @@ func TestQueryFrontend(t *testing.T) {
tsMillis := timestamp.FromTime(now)

var samplesrw []prompb.TimeSeries

metric := []prompb.Label{
{Name: "__name__", Value: "up"},
{Name: "instance", Value: "localhost:9090"},
Expand Down Expand Up @@ -89,7 +88,7 @@ func TestQueryFrontend(t *testing.T) {
t.Cleanup(cancel)

testutil.Ok(t, RemoteWrite(ctx, samplesrw, i.Endpoint("remote-write")))

testutil.Ok(t, q.WaitSumMetricsWithOptions(e2emon.Equals(1), []string{"thanos_store_nodes_grpc_connections"}, e2emon.WaitMissingMetrics()))

// Ensure we can get the result from Querier first so that it
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,6 @@ func rangeQuery(t *testing.T, ctx context.Context, addr string, q func() string,
return retExplanation
}


func RemoteWrite(ctx context.Context, timeseries []prompb.TimeSeries, addr string) error {
// Create write request
data, err := proto.Marshal(&prompb.WriteRequest{Timeseries: timeseries})
Expand All @@ -1746,7 +1745,7 @@ func RemoteWrite(ctx context.Context, timeseries []prompb.TimeSeries, addr strin
return err
}
defer runutil.ExhaustCloseWithErrCapture(&err, res.Body, "%s: close body", req.URL.String())

if res.StatusCode/100 != 2 {
return errors.Errorf("request failed with code %s", res.Status)
}
Expand Down

0 comments on commit a76e576

Please sign in to comment.