Skip to content

Commit

Permalink
tests: read expected hidden screens on Live ISO from anaconda.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
KKoukiou committed Jan 23, 2025
1 parent 719020d commit 0dca6d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/check-review
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TestReview(VirtInstallMachineCase):
p = Password(b, s.encryption_id_prefix)
r = Review(b, m)

pretend_live_iso(self, i)
pretend_live_iso(self, i, m)
i.open()
# After clicking 'Next' on the storage step, partitioning is done, thus changing the available space on the disk
# Since this is a non-destructive test we need to make sure the we reset partitioning to how it was before the test started
Expand Down
2 changes: 1 addition & 1 deletion test/check-storage-cockpit
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestStorageCockpitIntegration(VirtInstallMachineCase, StorageCase):
i = Installer(b, m, scenario="use-configured-storage")
s = Storage(b, m)

pretend_live_iso(self, i)
pretend_live_iso(self, i, m)

i.open()
s.check_disk_selected("vda")
Expand Down
10 changes: 7 additions & 3 deletions test/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ def add_public_key(machine):
machine.write(authorized_keys, public_key, perm="0600")


def pretend_live_iso(test, installer):
installer.steps.hidden_steps.extend([installer.steps.ACCOUNTS])
def pretend_live_iso(test, installer, machine):
hidden_screens = machine.execute("cat /etc/anaconda/profile.d/fedora-workstation.conf | grep anaconda-screen").split('\n')
hidden_screens = [x.strip() for x in hidden_screens]

installer.steps.hidden_steps.extend(hidden_screens)

test.restore_file('/run/anaconda/anaconda.conf')
test.machine.execute("sed -i 's/type = BOOT_ISO/type = LIVE_OS/g' /run/anaconda/anaconda.conf")
test.machine.execute("sed -i '/[anaconda]/a hidden_webui_pages = anaconda-screen-accounts' /run/anaconda/anaconda.conf")
test.machine.execute(f"sed -i '/[anaconda]/a hidden_webui_pages = {" ".join(hidden_screens)}' /run/anaconda/anaconda.conf")

def pretend_default_scheme(test, scheme):
test.restore_file('/run/anaconda/anaconda.conf')
Expand Down

0 comments on commit 0dca6d1

Please sign in to comment.