Skip to content

fix: add missing t.Helper() to renderSRIOV wrapper - #205

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:codequality/sriov-render-test-add-missing-t-helper-to-rendersriov
Open

fix: add missing t.Helper() to renderSRIOV wrapper#205
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:codequality/sriov-render-test-add-missing-t-helper-to-rendersriov

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

This PR addresses the following issue in pkg/networkoperatorplugin/sriov_render_test.go: add missing t.Helper() to renderSRIOV wrapper.

Changes

  • pkg/networkoperatorplugin/sriov_render_test.go: add missing t.Helper() to renderSRIOV wrapper.

Details

--- a/pkg/networkoperatorplugin/sriov_render_test.go
+++ b/pkg/networkoperatorplugin/sriov_render_test.go
@@ -1,3 +1,4 @@
-func renderSRIOV(t *testing.T, dir, fabric, networkTemplate string) map[string]string {
-	return renderSRIOVWithNamespaces(t, dir, fabric, networkTemplate, nil)
-}
+func renderSRIOV(t *testing.T, dir, fabric, networkTemplate string) map[string]string {
+	t.Helper()
+	return renderSRIOVWithNamespaces(t, dir, fabric, networkTemplate, nil)
+}

Tests

Let me know if you want tests added for this fix or not.

Contributor guidelines

Per this repo's CONTRIBUTING.md:

  • All commits are signed off (Signed-off-by trailer, DCO).

Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves Go test failure attribution by marking renderSRIOV as a test helper.

  • Adds t.Helper() before delegating to renderSRIOVWithNamespaces.
  • Does not alter rendering behavior or production code.

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The change only adjusts Go test failure attribution and leaves the helper’s rendering behavior unchanged.

Important Files Changed

Filename Overview
pkg/networkoperatorplugin/sriov_render_test.go Correctly marks the renderSRIOV wrapper as a test helper so failures are attributed to its callers.

Reviews (1): Last reviewed commit: "fix: add missing t.Helper() to renderSRI..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant