From 69776e5eea9e76a6e6251297ef3b1cf6d5808082 Mon Sep 17 00:00:00 2001 From: someshkoli Date: Tue, 1 Jun 2021 21:04:20 +0530 Subject: [PATCH] lint fix Signed-off-by: someshkoli --- test/e2e/e2ethanos/services.go | 2 +- test/e2e/query_test.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/e2e/e2ethanos/services.go b/test/e2e/e2ethanos/services.go index f19ccedeefb..ad2b72e5643 100644 --- a/test/e2e/e2ethanos/services.go +++ b/test/e2e/e2ethanos/services.go @@ -673,7 +673,7 @@ func NewPrometheusAndSidecarWithBasicAuth(sharedDir string, netName string, name if err := ioutil.WriteFile(filepath.Join(dir, "prometheus.yml"), []byte(promConfig), 0666); err != nil { return nil, nil, errors.Wrap(err, "creating prom config failed") } - fmt.Println(webConfig) + if err := ioutil.WriteFile(filepath.Join(dir, "web-config.yml"), []byte(webConfig), 0666); err != nil { return nil, nil, errors.Wrap(err, "creating web-config failed") } diff --git a/test/e2e/query_test.go b/test/e2e/query_test.go index ae3715a9af3..b936f2d5ec7 100644 --- a/test/e2e/query_test.go +++ b/test/e2e/query_test.go @@ -355,12 +355,16 @@ func TestQueryWithAuthorizedSidecar(t *testing.T) { prom, sidecar, err := e2ethanos.NewPrometheusAndSidecarWithBasicAuth(s.SharedDir(), s.NetworkName(), "alone", defaultPromConfig("prom-alone", 0, "", ""), defaultWebConfig(), e2ethanos.DefaultPrometheusImage()) testutil.Ok(t, err) - s.StartAndWaitReady(prom, sidecar) + _ = s.StartAndWaitReady(prom, sidecar) - q, err := e2ethanos.NewQuerier(s.SharedDir(), "alone", []string{sidecar.GRPCNetworkEndpoint()}, nil, nil, nil, nil, nil, "", "") + q, err := e2ethanos.NewQuerierBuilder(s.SharedDir(), "1", []string{sidecar.GRPCNetworkEndpoint()}).Build() testutil.Ok(t, err) testutil.Ok(t, s.StartAndWaitReady(q)) + // q, err := e2ethanos.NewQuerierBuilder(s.SharedDir(), "alone", []string{sidecar.GRPCNetworkEndpoint()}, nil, nil, nil, nil, nil, "", "") + // testutil.Ok(t, err).Build() + // testutil.Ok(t, s.StartAndWaitReady(q)) + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) t.Cleanup(cancel)