filesystem: passphrase in answers, failing test

This commit is contained in:
Dan Bungert 2022-02-08 15:38:07 -07:00
parent 7fba591bcf
commit 9bd3ea6a6c
2 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Filesystem:
guided: yes
guided-method: lvm
guided-index: 0
guided-passphrase: passw0rd
Identity:
realname: Ubuntu
username: ubuntu

View File

@ -89,10 +89,20 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
[disk] = [d for d in self.ui.body.form.disks
if d.label == label]
method = self.answers.get('guided-method')
self.ui.body.form.guided_choice.value = {
value = {
'disk': disk,
'use_lvm': method == "lvm",
}
passphrase = self.answers.get('guided-passphrase')
if passphrase is not None:
value['lvm_options'] = {
'encrypt': True,
'luks_options': {
'password': passphrase,
'confirm_password': passphrase,
}
}
self.ui.body.form.guided_choice.value = value
self.ui.body.done(self.ui.body.form)
await self.app.confirm_install()
while not isinstance(self.ui.body, FilesystemView):