fix gocritic
Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
parent
388645fa79
commit
09588f0c06
|
|
@ -534,12 +534,12 @@ func TestShardingEquivalenceScrapeCycle(t *testing.T) {
|
||||||
t.Fatal("shard 2 has 0 metrics when it shouldn't")
|
t.Fatal("shard 2 has 0 metrics when it shouldn't")
|
||||||
}
|
}
|
||||||
|
|
||||||
gotFiltered := append(got1Filtered, got2Filtered...)
|
got1Filtered = append(got1Filtered, got2Filtered...)
|
||||||
sort.Strings(gotFiltered)
|
sort.Strings(got1Filtered)
|
||||||
|
|
||||||
for i := 0; i < len(expectedFiltered); i++ {
|
for i := 0; i < len(expectedFiltered); i++ {
|
||||||
expected := strings.TrimSpace(expectedFiltered[i])
|
expected := strings.TrimSpace(expectedFiltered[i])
|
||||||
got := strings.TrimSpace(gotFiltered[i])
|
got := strings.TrimSpace(got1Filtered[i])
|
||||||
if expected != got {
|
if expected != got {
|
||||||
t.Fatalf("\n\nexpected:\n\n%q\n\nbut got:\n\n%q\n\n", expected, got)
|
t.Fatalf("\n\nexpected:\n\n%q\n\nbut got:\n\n%q\n\n", expected, got)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue