Project

General

Profile

Actions

action #176838

open

coordination #169654: [epic] Create test scenarios for Agama

Create open encryption scenario

Added by JERiveraMoya about 2 months ago. Updated 5 days ago.

Status:
In Progress
Priority:
High
Assignee:
Target version:
-
Start date:
2025-02-09
Due date:
% Done:

0%

Estimated time:

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

Screenshot_AgamaLive_skipped.png (122 KB) Screenshot_AgamaLive_skipped.png Planned actions when decryption is skipped rainerkoenig, 2025-02-11 09:59
Screenshot_AgamaLive_opened.png (147 KB) Screenshot_AgamaLive_opened.png Planned action when decryption is opened rainerkoenig, 2025-02-11 09:59
Actions #1

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
Actions #2

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

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:
Screenshot_AgamaLive_skipped.png

If we decrypt the device it will look different:
Planned action when decryption is opened

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?

Actions #4

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.

Actions #5

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....

Actions #6

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.

Actions #7

Updated by JERiveraMoya 28 days ago

  • Tags changed from qe-yam-feb-sprint-fy25 to qe-yam-mar-sprint-fy25
Actions #8

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.

Actions #9

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

Actions #10

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?

Actions #11

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.

Actions #12

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.

Actions #13

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.

Actions #14

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.

Actions #15

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.

Actions

Also available in: Atom PDF