storage: Show disks if FreedomBox is running in an unprivileged container

- Get disks info from df command and add info from udisks, if available.
  Before, it was other way round.
- Add a functional test that asserts root disk is available
- Remove unused key file_system_type from disks info

Closes #1765

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Veiko Aasa authored and James Valleroy committed 2020-02-02 09:40:12 -05:00
1 parent a0415bc110
commit 0f16a0fbee
7 files changed
+54 -11

No files matched your search

+2 -2
View File
@@ -28,8 +28,8 @@ from .service import wait_for_page_update
sys_modules = [
'avahi', 'backups', 'bind', 'cockpit', 'config', 'datetime', 'diagnostics',
'dynamicdns', 'firewall', 'letsencrypt', 'monkeysphere', 'names',
'networks', 'pagekite', 'power', 'security', 'snapshot', 'ssh', 'upgrades',
'users'
'networks', 'pagekite', 'power', 'security', 'snapshot', 'ssh', 'storage',
'upgrades','users'
]
default_url = config['DEFAULT']['url']
+5
View File
@@ -427,3 +427,8 @@ def networks_set_firewall_zone(browser, zone):
browser.find_link_by_href(edit_url).first.click()
browser.select('zone', zone)
browser.find_by_tag("form").first.find_by_tag('input')[-1].click()
def storage_is_root_disk_shown(browser):
table_cells = browser.find_by_tag('td')
return any(cell.text == '/' for cell in table_cells)