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
Validate only relevant parts of lvm+resize_root #9962
Conversation
leave it open for reviews but i am planning to try improve some parts as to retain some Object-oriented principles (if it i can do so without too many cases). Also i wonder if i need to add a validation for the resize partition. I have checked only manual so far. |
0a06dca
to
6c88a1d
Compare
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.
We don't have a module which asserts that size of the root partition is as per test data, which is one of the main differences to the default installation.
|
||
my $partitioner = $testapi::distri->get_expert_partitioner(); | ||
$partitioner->run_expert_partitioner($test_data->{root}->{expert_partitioner_from}); | ||
$partitioner->resize_partition_on_gpt_disk($test_data->{root}); | ||
send_key $cmd{accept}; |
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.
Please, do not use os-autoinst functions in test module. https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/ui-framework-documentation.md#access-to-os-autoinst-testapi-from-test-module
There is already created method for the case: $partitioner->accept_changes();
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.
I did make the change, adopting the accept_changes()
but as you see i had to rename the current method to accept_changes_and_press_next()
and create a new one. the reason is that the resize_partition_on_gpt_disk
has already press_next()
which the current accept_changes()
calls it again after the press_accept_button();
. i think it is more clear that trying to refactor part of the logic here, which is a bit tight between the connection of the methods.
the tickets implies to ensure that the resize is happening. i think this is covered + the shrinking to the relevant modules. are you asking for a validation of the partition size? i was asking for it here #9962 (comment). |
@rwx788 i added validation at the end of the scheduler. I assume that this is what you were asking for. |
I don't see any module which validates resizing and this is the main difference of this scenario to the default installation. We should assert that SUT got disk size as we have set it. |
86c9856
to
e2f8cf1
Compare
extra tests http://aquarius.suse.cz/tests/2512 and http://aquarius.suse.cz/tests/2513 |
I have a suggestion, which first of all will reduce the amount of changes in your PR and as the second - will not change existing API of AbstractExpertPartitioner. Just remove It was added in the past, probably because our partitioner module was not so easy to understand. It should be removed from all our test suites where we'll use new approach. Other than that LGTM. |
The reason for this is that we have the chance to apply Open Closed principle here. Instead of rely on the scheduler we empower the framework. This might be useful in the future as to be depended to the scheduler is not much flexiple. As of the number of changes is small ones and easy to check for the other tests that they use them. So if it is ok i would like to keep those changes. let me know if it is not clear what i am saying |
lib/Installation/Partitioner/LibstorageNG/SuggestedPartitioningPage.pm
Outdated
Show resolved
Hide resolved
|
||
select_start_with_existing_partitions() | ||
|
||
Opens current suggestion of the Expert Partiotioner from the Suggested Partitioning page . |
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.
It's actually current partitions, not suggestion. Don't you mind to improve this description?
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.
i tried to use the term of the UI. one is existing_partition and the other is current_suggestion. change done
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.
Please, run VR for SLE 15 SP1 https://openqa.suse.de/tests/4142241 QR update image.
Thanks for it as well. needles are differed and that was a nice catch. QA god bless you man |
http://aquarius.suse.cz/tests/2538 passed. i have to add two more needles. i am not sure about the naming. should be distinguished for it somehow?
|
There are |
Create scheduler with only relevant modules to validate the scenario and make sure that the /root is resized. The partitioning_resize_root.pm has been modified to use the Object_Oriented framework. Minor changes added. A function to open the current suggestion is added and the existing _run_expert_partitioner_ funtion is adjast to make available the choice between the latest and the option of _the existing_partition_. I renamed also the accept_changes and created a new one with the same name to make clear the separation of their functionality. Condition of _existing-partition_ and corresponding constant in the _select_item_in_system_view_table_ removed as it is not used and it does not provide any usability.
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.
Hmm, I don't see validate_modify_existing_partition
and what worries me more that CI didn't catch it...
My bad, file is there, all good. We can merge. |
Validate only relevant parts of lvm+resize_root