brev-cli icon indicating copy to clipboard operation
brev-cli copied to clipboard

fix: migrate from deprecated io/ioutil and enhance Workbench compatib…

Open kjw3 opened this issue 3 months ago • 0 comments

…ility tests

Major Changes:

  • Replace io/ioutil with io and os packages across 10 files (14 function calls)
    • ioutil.ReadAll -> io.ReadAll
    • ioutil.ReadFile -> os.ReadFile
    • ioutil.WriteFile -> os.WriteFile
    • ioutil.ReadDir -> os.ReadDir
  • Remove duplicate start command registration in pkg/cmd/cmd.go

Workbench Compatibility Enhancements:

  • Add comprehensive documentation to cli_output_compatibility_test.go
  • Add Test_ListWithOrgFlag to verify 'brev ls --org' support
  • Add Test_ShortHelpFlag to verify 'brev -h' works (Workbench uses this)
  • Add Test_VersionWithNoCheckLatestFlag for flag variation testing
  • Add Test_InstanceListColumnHeadersStability for critical column validation
  • Add Test_OrgListColumnHeadersStability for org list format
  • Add Test_CommandExistenceForWorkbench for comprehensive command checks
  • Improve Test_StartCommandFormat to explicitly verify --org flag

All changes verified with successful build and test execution. Tests ensure backward compatibility with NVIDIA AI Workbench integration.

kjw3 avatar Oct 24 '25 15:10 kjw3