test: add t.Helper() calls to test helper functions (#7351)

This commit is contained in:
Ville Vesilehto
2025-06-05 00:36:04 +03:00
committed by GitHub
parent b4abdcacf0
commit 9f9aed31cf
30 changed files with 52 additions and 13 deletions

View File

@@ -136,6 +136,7 @@ func TestWeightFileUpdate(t *testing.T) {
}
func checkDomainsWRR(t *testing.T, testIndex int, expectedDomains, domains map[string]weights) error {
t.Helper()
var ret error
retError := errors.New("Check domains failed")
for dname, expectedWeights := range expectedDomains {
@@ -410,6 +411,7 @@ func TestLoadBalanceWRR(t *testing.T) {
}
func checkTopIP(t *testing.T, i, j int, result []dns.RR, expectedTopIP string) {
t.Helper()
expected := net.ParseIP(expectedTopIP)
for _, r := range result {
switch r.Header().Rrtype {