apptest: run go fix -rangeint

This commit is contained in:
Aliaksandr Valialkin
2026-02-18 12:21:07 +01:00
parent 175fcf6676
commit 2ffd25a120
3 changed files with 4 additions and 4 deletions

View File

@@ -278,7 +278,7 @@ func validateStreamReadHeaders(t *testing.T, r *http.Request) bool {
func GenerateRemoteReadSeries(start, end, numOfSeries, numOfSamples int64) []*prompb.TimeSeries {
var ts []*prompb.TimeSeries
j := 0
for i := 0; i < int(numOfSeries); i++ {
for i := range int(numOfSeries) {
if i%3 == 0 {
j++
}

View File

@@ -313,7 +313,7 @@ func TestSingleVMAgentDropOnOverload(t *testing.T) {
waitFor := func(f func() bool) {
t.Helper()
for i := 0; i < retries; i++ {
for range retries {
if f() {
return
}
@@ -339,7 +339,7 @@ func TestSingleVMAgentDropOnOverload(t *testing.T) {
// Send 2 more requests, the first RW endpoint should receive everything, the second should add them to the queue
// since worker is busy with the first request.
for i := 0; i < 2; i++ {
for i := range 2 {
vmagent.APIV1ImportPrometheusNoWaitFlush(t, []string{
"foo_bar 1 1652169600000", // 2022-05-10T08:00:00Z
}, apptest.QueryOpts{})

View File

@@ -145,7 +145,7 @@ func (app *Vmagent) ReloadRelabelConfigs(t *testing.T) {
}
var currTotal float64
for i := 0; i < 30; i++ {
for range 30 {
currTotal = app.GetMetric(t, "vmagent_relabel_config_reloads_total")
if currTotal > prevTotal {
return