Reorganize and extend clients for manual testing #1274
Merged
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.
Problem
We used to have two clients that where there just for the developers to do some manual testing of new features or to verify how YaST behaves in the scenario of a given bug report:
proposal_testing
to test the initial partitioning proposal made by the installer & the Guided Setup (pretty bad name, BTW, since it does not mention which of the dozens of YaST proposals it refers to)partitioner_testing
to test the PartitionerBoth clients contained duplicated code for the mocking part (ie. reading the probed devicegraph from a file).
I wanted to add just another client for manual testing. This time for manually reproducing the behavior of the AutoYaST partitioning proposal. Another separate client would have implied repeating the mocking code a third time.
Solution
Unify all the xxx_testing clients into a single one, keeping as much as possible the syntax of the original command lines. Thus:
yast2 partitioner_testing /path/to/devicegraph.xml
yast2 storage_testing partitioner /path/to/devicegraph.xml
yast2 proposal_testing /the/devicegraph.xml /the/control_file.xml
yast2 storage_testing proposal /the/devicegraph.xml /the/control_file.xml
yast2 storage_testing autoinst /the/devicegraph.xml /the/profile.xml
The first two work exactly like before. The third one looks like this: