action #176838
opencoordination #169654: [epic] Create test scenarios for Agama
Create open encryption scenario
0%
Description
Motivation¶
When reusing a previous partitioning we can open the encryption, the installer will reflect this in a way that we will see more destructive actions (one per each partition that was found after introducing the encryption key) in the case when was opened and a few ones when not (it will delete the whole encrypted partition, not being aware of more granularity).
See for YaST installer both cases:
(1) https://openqa.suse.de/tests/16683382#step/activate_encrypted_volume/1
https://openqa.suse.de/tests/16683382#step/accept_proposed_layout/1
(2) https://openqa.suse.de/tests/16681983#step/cancel_encrypted_volume/1
https://openqa.suse.de/tests/16681983#step/accept_proposed_layout/1
Acceptance criteria¶
- AC1: Implement in the interactive installation the possibility to open the encryption
- AC2: Check in the web page with puppeteer the destructive actions
- AC3: Publish image for lvm encrypted unattended and chain it with new two test suites performing this new test case.
Files
Updated by JERiveraMoya about 2 months ago
- Subject changed from Create open encryption and skip encryption scenario to Create open encryption and skip encryption scenarios
Updated by rainerkoenig about 2 months ago
- Status changed from Workable to In Progress
- Assignee set to rainerkoenig
Updated by rainerkoenig about 2 months ago
- File Screenshot_AgamaLive_skipped.png Screenshot_AgamaLive_skipped.png added
- File Screenshot_AgamaLive_opened.png Screenshot_AgamaLive_opened.png added
This needs some more clarification. So the idea is to reuse the HDD_1 with the encrypted LVM on it and then start another installation which will then notice the encrypted disk and ask what to do.
After making this descion we move forward to the storage screen then and check the planned actions for our choice.
So if we skip the decryption they will look like this:
If we decrypt the device it will look different:
So now we have two test suites, one for the "open" and one for the "skipped" scenarion.
Do we need to perform a full installation in those test suites or is it enough that we check the planned actions and stop there if they match our expectations?
Updated by JERiveraMoya about 2 months ago
You got the idea, yes, I would prefer to perform the installation and check the partitioning on it post installation that corresponds with the expected default.
I'm not really in favor of changing to command line to do some actions like to check that the encryptioned was opened, checking this via the planned deleted partitioning should be sufficient.
Updated by rainerkoenig about 1 month ago
First step is done, successfully handled the dialog to decrypt the device or skip the decryption. VRs on my local are succesful so far.
No the difficult part: How to check the resulting action....
Updated by JERiveraMoya about 1 month ago
glad you are on track, you can send a draft PR so we can pair-up/code review early code.
as I mentioned in last daily, we should ensure that with the new UI things as similar or adapt them, agama 12 will reach B2 in few days and currently you can use development job group.
Updated by JERiveraMoya 28 days ago
- Tags changed from qe-yam-feb-sprint-fy25 to qe-yam-mar-sprint-fy25
Updated by rainerkoenig 27 days ago
After a painful battle with locators it seems that those work for checking the destructive actions:
private readonly decryptDestructiveActionsText = () =>
this.page.locator("::-p-text(Check the 31 planned actions)");
private readonly skipDestructiveActionsText = () =>
this.page.locator("::-p-text(Check the 16 planned actions)");
VRs on the local VM pass now in both cases.
Updated by JERiveraMoya 27 days ago
Thanks for opening PR as suggested in daily the other day, so can do some early review, could you resolve conflicts there to start the process:
https://github.com/jknphy/agama-integration-test-webpack/pull/84
Updated by JERiveraMoya 21 days ago
I'm wondering if the case for skip
is so fundamental, we might simplify the task here only checking for the opening.
Leo is creating a test suite sles_extended
where we could just add it. Most likely we would not be able to adress all the yes/no option in the installer. wdyt?
Updated by rainerkoenig 18 days ago
I now changed the code so that we have a parameter --decrypt-password
which works on my local VM.
To enhance the checks for destructive actions I need some more knowledge about all that locator and selector stuff.
Updated by JERiveraMoya 17 days ago
- Subject changed from Create open encryption and skip encryption scenarios to Create open encryption scenario
- Description updated (diff)
Updated to reflect that we will only target the decrypt action.
Updated by rainerkoenig 7 days ago
One step forward. The storage page now got this:
private readonly decryptDestructiveActionsText = () => this.page.locator("::-p-text(Check)");
private readonly destructiveActionText = (name: string) =>
this.page.locator(`::-p-text(${name})`);
and
async verifyDecryptDestructiveActions() {
await this.decryptDestructiveActionsText().click();
await this.destructiveActionText("Delete btrfs on").wait();
await this.destructiveActionText("Delete logical volume lv ").wait();
await this.destructiveActionText("Delete logical volume lv0").wait();
}
Tests on local VM passed and when adding a typo to the texts to check for the test fails as expected, so it seems to work.
Commit pushed.
Updated by JERiveraMoya 6 days ago ยท Edited
Thanks for the update. I try to avoid to do code review when I see conflicts in the PR, because comments might be more confusing that helpful as I would referring to outdated code. Please take care of that each time you push code.
I commented in the PR relative to your previous comment, other than that it is unrevieweable atm.
Updated by rainerkoenig 6 days ago
Rebased and solved all conflicts, but still troubles.
The main problem now is PR#89
which introduces
function ensureProductConfigured() {
it("should start configuring the product", async function () {
await new ConfiguringProductPage(page).wait();
});
it("should finish configuring the product", async function () {
await new SidebarPage(page).waitOverviewVisible(40000);
});
}
And the problem here is that after starting configure the product now the dialog with the decryption options appear, so we will never pass the "should finish configuring the product" part becasue we're stuck in that unhandled dialog. That of course only kicks in when the existing hard drive is encrypted.
Updated by JERiveraMoya 5 days ago
Please address: https://openqa.suse.de/tests/17160082#comments