From ab93ce029f65005c9ea851752e459b0e6d97812d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Baung=C3=A5rd=20Hansen?= Date: Mon, 8 Jan 2024 12:38:14 +0100 Subject: [PATCH] Tests: unique docker env name for tenant tests (#7038) The e2e tests would occasionally fail due to non-unqiue docker environment names. With this commit the tests are environments are given unique names to avoid these failures. Signed-off-by: Jacob Baungard Hansen Signed-off-by: hanyuting8 --- test/e2e/query_frontend_test.go | 4 ++-- test/e2e/query_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/query_frontend_test.go b/test/e2e/query_frontend_test.go index e14832d8b9..b5341fd8de 100644 --- a/test/e2e/query_frontend_test.go +++ b/test/e2e/query_frontend_test.go @@ -1034,12 +1034,12 @@ func (u tenantRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { func TestTenantQFEHTTPMetrics(t *testing.T) { t.Parallel() - e, err := e2e.NewDockerEnvironment("tenant-metrics") + e, err := e2e.NewDockerEnvironment("qfetenantmetrics") testutil.Ok(t, err) t.Cleanup(e2ethanos.CleanScenario(t, e)) // scrape the local prometheus, and our querier metrics - prom1, sidecar1 := e2ethanos.NewPrometheusWithSidecar(e, "alone", e2ethanos.DefaultPromConfig("prom-alone", 0, "", "", e2ethanos.LocalPrometheusTarget, "tenant-metrics-querier-1:8080"), "", e2ethanos.DefaultPrometheusImage(), "") + prom1, sidecar1 := e2ethanos.NewPrometheusWithSidecar(e, "alone", e2ethanos.DefaultPromConfig("prom-alone", 0, "", "", e2ethanos.LocalPrometheusTarget, "qfetenantmetrics-querier-1:8080"), "", e2ethanos.DefaultPrometheusImage(), "") q := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc")).Init() testutil.Ok(t, e2e.StartAndWaitReady(q)) diff --git a/test/e2e/query_test.go b/test/e2e/query_test.go index a4b163941e..1844bb7a23 100644 --- a/test/e2e/query_test.go +++ b/test/e2e/query_test.go @@ -2420,12 +2420,12 @@ func TestSidecarPrefersExtLabels(t *testing.T) { func TestTenantHTTPMetrics(t *testing.T) { t.Parallel() - e, err := e2e.NewDockerEnvironment("tenant-metrics") + e, err := e2e.NewDockerEnvironment("q-tenant-metrics") testutil.Ok(t, err) t.Cleanup(e2ethanos.CleanScenario(t, e)) // scrape the local prometheus, and our querier metrics - prom1, sidecar1 := e2ethanos.NewPrometheusWithSidecar(e, "alone", e2ethanos.DefaultPromConfig("prom-alone", 0, "", "", e2ethanos.LocalPrometheusTarget, "tenant-metrics-querier-1:8080"), "", e2ethanos.DefaultPrometheusImage(), "") + prom1, sidecar1 := e2ethanos.NewPrometheusWithSidecar(e, "alone", e2ethanos.DefaultPromConfig("prom-alone", 0, "", "", e2ethanos.LocalPrometheusTarget, "q-tenant-metrics-querier-1:8080"), "", e2ethanos.DefaultPrometheusImage(), "") q := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc")).Init() testutil.Ok(t, e2e.StartAndWaitReady(q))