refactor(cmd/virtwork): remove duplicate and misplaced tests#149
Merged
Conversation
Delete cmdstructure_test.go (flag-existence checks duplicated by main_test.go value-based flag tests and implicitly by rune/cleanupe tests) and print_test.go (thin formatting wrappers already exercised through cleanupe_test.go dry-run paths). Trim main_test.go by removing seven Describe blocks that tested internal/ package functions directly (vm.BuildVMSpec, resources. EnsureNamespace, cleanup.CleanupAll, workloads registry, config pointer semantics) rather than cmd wiring — these are already covered by their respective package test suites. Removes 794 lines with no change to coverage (85.5%). Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrhillsman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The tests used /nonexistent/deeply/nested/path which can succeed on systems where the process has permission to create directories at /. Switch to /dev/null/impossible/ which always fails because /dev/null is a device file, not a directory. Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delete cmdstructure_test.go (flag-existence checks duplicated by main_test.go value-based flag tests and implicitly by rune/cleanupe tests) and print_test.go (thin formatting wrappers already exercised through cleanupe_test.go dry-run paths).
Trim main_test.go by removing seven Describe blocks that tested internal/ package functions directly (vm.BuildVMSpec, resources. EnsureNamespace, cleanup.CleanupAll, workloads registry, config pointer semantics) rather than cmd wiring — these are already covered by their respective package test suites.
Removes 794 lines with no change to coverage (85.5%).