Skip to content

Commit

Permalink
Bump E2E version (#5187)
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Gera <matejgera@gmail.com>
  • Loading branch information
matej-g committed Mar 2, 2022
1 parent 13b0b37 commit afe25fa
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 106 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/chromedp/chromedp v0.5.3
github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab
github.com/davecgh/go-spew v1.1.1
github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47
github.com/efficientgo/e2e v0.11.2-0.20220224081107-b67f7b039363
github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208
github.com/efficientgo/tools/extkingpin v0.0.0-20210609125236-d73259166f20
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7j
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47 h1:k0qDUhOU0KJqKztQYJL1qMBR9nCOntuIRWYwA56Z634=
github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47/go.mod h1:vDnF4AAEZmO0mvyFIATeDJPFaSRM7ywaOnKd61zaSoE=
github.com/efficientgo/e2e v0.11.2-0.20220224081107-b67f7b039363 h1:wlimY9L7RuHjNugLWsYH1wFTpkonEc3rktYSLx8aXu0=
github.com/efficientgo/e2e v0.11.2-0.20220224081107-b67f7b039363/go.mod h1:vDnF4AAEZmO0mvyFIATeDJPFaSRM7ywaOnKd61zaSoE=
github.com/efficientgo/tools/core v0.0.0-20210731122119-5d4a0645ce9a h1:Az9zRvQubUIHE+tHAm0gG7Dwge08V8Q/9uNSIFjFm+A=
github.com/efficientgo/tools/core v0.0.0-20210731122119-5d4a0645ce9a/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M=
github.com/efficientgo/tools/extkingpin v0.0.0-20210609125236-d73259166f20 h1:kM/ALyvAnTrwSB+nlKqoKaDnZbInp1YImZvW+gtHwc8=
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/e2ethanos/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewService(
readiness *e2e.HTTPReadinessProbe,
http, grpc int,
otherPorts ...Port,
) *e2e.InstrumentedRunnable {
) e2e.InstrumentedRunnable {
return newUninitiatedService(e, name, http, grpc, otherPorts...).Init(
e2e.StartOptions{
Image: image,
Expand All @@ -41,7 +41,7 @@ func newUninitiatedService(
name string,
http, grpc int,
otherPorts ...Port,
) *e2e.FutureInstrumentedRunnable {
) e2e.InstrumentedRunnableBuilder {
metricsPorts := "http"
ports := map[string]int{
"http": http,
Expand All @@ -56,15 +56,15 @@ func newUninitiatedService(
}
}

return e2e.NewInstrumentedRunnable(e, name, ports, metricsPorts)
return e2e.NewInstrumentedRunnable(e, name).WithPorts(ports, metricsPorts)
}

func initiateService(
service *e2e.FutureInstrumentedRunnable,
service e2e.InstrumentedRunnableBuilder,
image string,
command e2e.Command,
readiness *e2e.HTTPReadinessProbe,
) *e2e.InstrumentedRunnable {
) e2e.InstrumentedRunnable {
return service.Init(
e2e.StartOptions{
Image: image,
Expand Down
115 changes: 63 additions & 52 deletions test/e2e/e2ethanos/services.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions test/e2e/exemplars_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const (
func TestExemplarsAPI_Fanout(t *testing.T) {
t.Parallel()
var (
prom1, prom2 *e2e.InstrumentedRunnable
sidecar1, sidecar2 *e2e.InstrumentedRunnable
prom1, prom2 e2e.InstrumentedRunnable
sidecar1, sidecar2 e2e.InstrumentedRunnable
err error
e *e2e.DockerEnvironment
)
Expand All @@ -42,7 +42,7 @@ func TestExemplarsAPI_Fanout(t *testing.T) {
prom1, sidecar1, err = e2ethanos.NewPrometheusWithSidecar(
e,
"prom1",
defaultPromConfig("ha", 0, "", "", "localhost:9090", qUnitiated.InternalEndpoint("http")),
defaultPromConfig("ha", 0, "", "", "localhost:9090", qUnitiated.Future().InternalEndpoint("http")),
"",
e2ethanos.DefaultPrometheusImage(),
"",
Expand All @@ -52,7 +52,7 @@ func TestExemplarsAPI_Fanout(t *testing.T) {
prom2, sidecar2, err = e2ethanos.NewPrometheusWithSidecar(
e,
"prom2",
defaultPromConfig("ha", 1, "", "", "localhost:9090", qUnitiated.InternalEndpoint("http")),
defaultPromConfig("ha", 1, "", "", "localhost:9090", qUnitiated.Future().InternalEndpoint("http")),
"",
e2ethanos.DefaultPrometheusImage(),
"",
Expand All @@ -64,7 +64,7 @@ func TestExemplarsAPI_Fanout(t *testing.T) {
config:
sampler_type: const
sampler_param: 1
service_name: %s`, qUnitiated.Name())
service_name: %s`, qUnitiated.Future().Name())

stores := []string{sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc")}

Expand Down
18 changes: 9 additions & 9 deletions test/e2e/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func TestQuery(t *testing.T) {

prom1, sidecar1, err := e2ethanos.NewPrometheusWithSidecar(e, "alone", defaultPromConfig("prom-alone", 0, "", ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
prom3, sidecar3, err := e2ethanos.NewPrometheusWithSidecar(e, "ha1", defaultPromConfig("prom-ha", 0, "", filepath.Join(e2ethanos.ContainerSharedDir, "", "*.yaml")), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
Expand All @@ -174,7 +174,7 @@ func TestQuery(t *testing.T) {
testutil.Ok(t, e2e.StartAndWaitReady(prom1, sidecar1, prom2, sidecar2, prom3, sidecar3, prom4, sidecar4))

// Querier. Both fileSD and directly by flags.
q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.InternalEndpoint("grpc")).
q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.Future().InternalEndpoint("grpc")).
WithFileSDStoreAddresses(sidecar3.InternalEndpoint("grpc"), sidecar4.InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))
Expand Down Expand Up @@ -319,11 +319,11 @@ func TestQueryLabelNames(t *testing.T) {

prom1, sidecar1, err := e2ethanos.NewPrometheusWithSidecar(e, "alone", defaultPromConfig("prom-alone", 0, "", ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1, sidecar1, prom2, sidecar2))

q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -371,11 +371,11 @@ func TestQueryLabelValues(t *testing.T) {

prom1, sidecar1, err := e2ethanos.NewPrometheusWithSidecar(e, "alone", defaultPromConfig("prom-alone", 0, "", ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
prom2, sidecar2, err := e2ethanos.NewPrometheusWithSidecar(e, "remote-and-sidecar", defaultPromConfig("prom-both-remote-write-and-sidecar", 1234, e2ethanos.RemoteWriteEndpoint(receiver.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage(), "")
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1, sidecar1, prom2, sidecar2))

q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", sidecar1.InternalEndpoint("grpc"), sidecar2.InternalEndpoint("grpc"), receiver.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -470,7 +470,7 @@ func TestQueryCompatibilityWithPreInfoAPI(t *testing.T) {
p1, s1, err := e2ethanos.NewPrometheusWithSidecarCustomImage(
e,
"p1",
defaultPromConfig("p1", 0, "", filepath.Join(e2ethanos.ContainerSharedDir, promRulesSubDir, "*.yaml"), "localhost:9090", qUninit.InternalEndpoint("http")),
defaultPromConfig("p1", 0, "", filepath.Join(e2ethanos.ContainerSharedDir, promRulesSubDir, "*.yaml"), "localhost:9090", qUninit.Future().InternalEndpoint("http")),
"",
e2ethanos.DefaultPrometheusImage(),
"",
Expand All @@ -490,7 +490,7 @@ func TestQueryCompatibilityWithPreInfoAPI(t *testing.T) {
config:
sampler_type: const
sampler_param: 1
service_name: %s`, qUninit.Name())). // Use fake tracing config to trigger exemplar.
service_name: %s`, qUninit.Future().Name())). // Use fake tracing config to trigger exemplar.
WithImage(tcase.queryImage).
Initiate(qUninit, s1.InternalEndpoint("grpc"))
testutil.Ok(t, err)
Expand Down Expand Up @@ -1088,7 +1088,7 @@ func queryExemplars(t *testing.T, ctx context.Context, addr, q string, start, en
}))
}

func synthesizeSamples(ctx context.Context, prometheus *e2e.InstrumentedRunnable, testSamples []fakeMetricSample) error {
func synthesizeSamples(ctx context.Context, prometheus e2e.InstrumentedRunnable, testSamples []fakeMetricSample) error {
samples := make([]model.Sample, len(testSamples))
for i, s := range testSamples {
samples[i] = newSample(s)
Expand Down
56 changes: 28 additions & 28 deletions test/e2e/receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ func TestReceive(t *testing.T) {

h := receive.HashringConfig{
Endpoints: []string{
r1.InternalEndpoint("grpc"),
r2.InternalEndpoint("grpc"),
r3.InternalEndpoint("grpc"),
r1.Future().InternalEndpoint("grpc"),
r2.Future().InternalEndpoint("grpc"),
r3.Future().InternalEndpoint("grpc"),
},
}

Expand All @@ -361,15 +361,15 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(r1Runnable, r2Runnable, r3Runnable))

prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
prom2, _, err := e2ethanos.NewPrometheus(e, "2", defaultPromConfig("prom2", 0, e2ethanos.RemoteWriteEndpoint(r2.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom2, _, err := e2ethanos.NewPrometheus(e, "2", defaultPromConfig("prom2", 0, e2ethanos.RemoteWriteEndpoint(r2.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
prom3, _, err := e2ethanos.NewPrometheus(e, "3", defaultPromConfig("prom3", 0, e2ethanos.RemoteWriteEndpoint(r3.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom3, _, err := e2ethanos.NewPrometheus(e, "3", defaultPromConfig("prom3", 0, e2ethanos.RemoteWriteEndpoint(r3.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1, prom2, prom3))

q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.InternalEndpoint("grpc"), r2.InternalEndpoint("grpc"), r3.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.Future().InternalEndpoint("grpc"), r2.Future().InternalEndpoint("grpc"), r3.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -418,9 +418,9 @@ func TestReceive(t *testing.T) {

h := receive.HashringConfig{
Endpoints: []string{
r1.InternalEndpoint("grpc"),
r2.InternalEndpoint("grpc"),
r3.InternalEndpoint("grpc"),
r1.Future().InternalEndpoint("grpc"),
r2.Future().InternalEndpoint("grpc"),
r3.Future().InternalEndpoint("grpc"),
},
}

Expand All @@ -434,15 +434,15 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(r1Runnable, r2Runnable, r3Runnable))

prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
prom2, _, err := e2ethanos.NewPrometheus(e, "2", defaultPromConfig("prom2", 0, e2ethanos.RemoteWriteEndpoint(r2.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom2, _, err := e2ethanos.NewPrometheus(e, "2", defaultPromConfig("prom2", 0, e2ethanos.RemoteWriteEndpoint(r2.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
prom3, _, err := e2ethanos.NewPrometheus(e, "3", defaultPromConfig("prom3", 0, e2ethanos.RemoteWriteEndpoint(r3.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom3, _, err := e2ethanos.NewPrometheus(e, "3", defaultPromConfig("prom3", 0, e2ethanos.RemoteWriteEndpoint(r3.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1, prom2, prom3))

q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.InternalEndpoint("grpc"), r2.InternalEndpoint("grpc"), r3.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.Future().InternalEndpoint("grpc"), r2.Future().InternalEndpoint("grpc"), r3.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -496,9 +496,9 @@ func TestReceive(t *testing.T) {

h := receive.HashringConfig{
Endpoints: []string{
r1.InternalEndpoint("grpc"),
r2.InternalEndpoint("grpc"),
r3.InternalEndpoint("grpc"),
r1.Future().InternalEndpoint("grpc"),
r2.Future().InternalEndpoint("grpc"),
r3.Future().InternalEndpoint("grpc"),
},
}

Expand All @@ -511,11 +511,11 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(r1Runnable, r2Runnable, r3Runnable))

prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1))

q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.InternalEndpoint("grpc"), r2.InternalEndpoint("grpc"), r3.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.Future().InternalEndpoint("grpc"), r2.Future().InternalEndpoint("grpc"), r3.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -568,9 +568,9 @@ func TestReceive(t *testing.T) {

h := receive.HashringConfig{
Endpoints: []string{
r1.InternalEndpoint("grpc"),
r2.InternalEndpoint("grpc"),
r3.InternalEndpoint("grpc"),
r1.Future().InternalEndpoint("grpc"),
r2.Future().InternalEndpoint("grpc"),
r3.Future().InternalEndpoint("grpc"),
},
}

Expand All @@ -581,11 +581,11 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(r1Runnable, r2Runnable))

prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
prom1, _, err := e2ethanos.NewPrometheus(e, "1", defaultPromConfig("prom1", 0, e2ethanos.RemoteWriteEndpoint(r1.Future().InternalEndpoint("remote-write")), ""), "", e2ethanos.DefaultPrometheusImage())
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1))

q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.InternalEndpoint("grpc"), r2.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.Future().InternalEndpoint("grpc"), r2.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))

Expand Down Expand Up @@ -625,7 +625,7 @@ func TestReceive(t *testing.T) {

h := receive.HashringConfig{
Endpoints: []string{
r1.InternalEndpoint("grpc"),
r1.Future().InternalEndpoint("grpc"),
},
}

Expand All @@ -634,9 +634,9 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(r1Runnable))

rp1, err := e2ethanos.NewReverseProxy(e, "1", "tenant-1", "http://"+r1.InternalEndpoint("remote-write"))
rp1, err := e2ethanos.NewReverseProxy(e, "1", "tenant-1", "http://"+r1.Future().InternalEndpoint("remote-write"))
testutil.Ok(t, err)
rp2, err := e2ethanos.NewReverseProxy(e, "2", "tenant-2", "http://"+r1.InternalEndpoint("remote-write"))
rp2, err := e2ethanos.NewReverseProxy(e, "2", "tenant-2", "http://"+r1.Future().InternalEndpoint("remote-write"))
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(rp1, rp2))

Expand All @@ -646,7 +646,7 @@ func TestReceive(t *testing.T) {
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(prom1, prom2))

q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.InternalEndpoint("grpc")).Build()
q, err := e2ethanos.NewQuerierBuilder(e, "1", r1.Future().InternalEndpoint("grpc")).Build()
testutil.Ok(t, err)
testutil.Ok(t, e2e.StartAndWaitReady(q))
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func reloadRulesHTTP(t *testing.T, ctx context.Context, endpoint string) {
testutil.Equals(t, 200, resp.StatusCode)
}

func reloadRulesSignal(t *testing.T, r *e2e.InstrumentedRunnable) {
func reloadRulesSignal(t *testing.T, r e2e.InstrumentedRunnable) {
c := e2e.NewCommand("kill", "-1", "1")
_, _, err := r.Exec(c)
testutil.Ok(t, err)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/rules_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestRulesAPI_Fanout(t *testing.T) {
queryCfg := []httpconfig.Config{
{
EndpointsConfig: httpconfig.EndpointsConfig{
StaticAddresses: []string{qUninit.InternalEndpoint("http")},
StaticAddresses: []string{qUninit.Future().InternalEndpoint("http")},
Scheme: "http",
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/store_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ metafile_content_ttl: 0s`

// Wait for store to sync blocks.
// thanos_blocks_meta_synced: 1x loadedMeta 0x labelExcludedMeta 0x TooFreshMeta.
for _, st := range []*e2e.InstrumentedRunnable{store1, store2, store3} {
for _, st := range []e2e.InstrumentedRunnable{store1, store2, store3} {
t.Run(st.Name(), func(t *testing.T) {
testutil.Ok(t, st.WaitSumMetrics(e2e.Equals(1), "thanos_blocks_meta_synced"))
testutil.Ok(t, st.WaitSumMetrics(e2e.Equals(0), "thanos_blocks_meta_sync_failures_total"))
Expand All @@ -502,7 +502,7 @@ metafile_content_ttl: 0s`
},
)

for _, st := range []*e2e.InstrumentedRunnable{store1, store2, store3} {
for _, st := range []e2e.InstrumentedRunnable{store1, store2, store3} {
testutil.Ok(t, st.WaitSumMetricsWithOptions(e2e.Greater(0), []string{`thanos_cache_groupcache_loads_total`}))
testutil.Ok(t, st.WaitSumMetricsWithOptions(e2e.Greater(0), []string{`thanos_store_bucket_cache_operation_hits_total`}, e2e.WithLabelMatchers(matchers.MustNewMatcher(matchers.MatchEqual, "config", "chunks"))))
}
Expand Down

0 comments on commit afe25fa

Please sign in to comment.