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

@@ -120,6 +120,7 @@ func TestLookupStaticHost(t *testing.T) {
}
func testStaticHost(t *testing.T, ent staticHostEntry, h *Hostsfile) {
t.Helper()
ins := []string{ent.in, plugin.Name(ent.in).Normalize(), strings.ToLower(ent.in), strings.ToUpper(ent.in)}
for k, in := range ins {
addrsV4 := h.LookupStaticHostV4(in)
@@ -206,6 +207,7 @@ func TestLookupStaticAddr(t *testing.T) {
}
func testStaticAddr(t *testing.T, ent staticIPEntry, h *Hostsfile) {
t.Helper()
hosts := h.LookupStaticAddr(ent.in)
for i := range ent.out {
ent.out[i] = plugin.Name(ent.out[i]).Normalize()