-
Notifications
You must be signed in to change notification settings - Fork 594
refactor(general): misc cleanups #4652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR performs miscellaneous cleanups across test code, simplifying temporary directory creation, unifying skip helper names, and modernizing assertion patterns.
- Replace manual
os.MkdirTempsetup witht.TempDirand consolidate error checks usingrequire - Rename and consolidate skip helpers from
TestSkip*toSkipTest*and update their usage - Convert Windows path literals to raw string syntax and streamline CLI test logging
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/tools/kopiarunner/kopia_snapshotter_exe_test.go | Switch to t.TempDir, use require helpers, and consolidate empty-slice check |
| tests/testenv/cli_test_env.go | Cache getLogOutputPrefix result, simplify stdout/stderr logging conditions |
| tests/end_to_end_test/restore_test.go | Rename TestSkipUnlessLinux to SkipTestUnlessLinux |
| tests/end_to_end_test/norace_test.go | Use t.TempDir instead of testutil.TempDirectory, remove unused import |
| snapshot/upload/upload_test.go | Add assertion messages, rename skip helper to SkipTestOnCIUnlessLinuxAMD64 |
| repo/blob/sftp/sftp_storage_test.go | Rename skip helper to SkipTestOnCIUnlessLinuxAMD64 |
| repo/blob/s3/s3_storage_test.go | Rename skip helper to SkipTestOnCIUnlessLinuxAMD64 |
| internal/testutil/testutil.go | Remove deprecated TestSkip* functions, add SkipTest* replacements |
| internal/testutil/dockertestutil.go | Replace TestSkipUnlessCI with explicit tb.Skipf/tb.Fatalf logic |
| fs/localfs/local_fs_test.go | Convert Windows path literals to raw string backticks for clarity |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4652 +/- ##
==========================================
+ Coverage 75.86% 76.39% +0.53%
==========================================
Files 470 529 +59
Lines 37301 40160 +2859
==========================================
+ Hits 28299 30682 +2383
- Misses 7071 7460 +389
- Partials 1931 2018 +87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.