Skip to content

Refactor test helper methods #216

@peteski22

Description

@peteski22

🧹 Nitpick | 🔵 Trivial

Deduplicate test helpers across packages

ptrBool/ptrString are redefined in multiple test files. Consider a shared testutil to reduce duplication and keep helpers consistent.

🤖 Prompt for AI Agents
In internal/printer/plugin_list_printer_test.go around lines 425 to 433, the
helper functions ptrBool and ptrString are duplicated across test files; move
these helpers into a shared test utility package (e.g., internal/testutil or
testutil) and update imports in tests to use the centralized functions. Create
exported functions PtrBool and PtrString (or keep ptr* if package-local but
imported) in the shared file, remove the local duplicates from this test, and
run `go test ./...` to ensure all references are updated and compile-time
imports adjusted.

Originally posted by @coderabbitai[bot] in #215 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions