mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
tests: functional: storage: skip test List disks
Skip the test Scenario: List disks when inside a container Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
1 parent
dabaf53994
commit
a02b0baad1
2 files changed
+13
-1
No files matched your search
@@ -7,6 +7,7 @@ import configparser
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
from contextlib import contextmanager
|
||||
@@ -424,6 +425,13 @@ def service_is_not_running(browser, app_name):
|
||||
return len(browser.find_by_id('service-not-running')) != 0
|
||||
|
||||
|
||||
def running_inside_container():
|
||||
"""Check if freedombox is running inside a container"""
|
||||
result = subprocess.run(['systemd-detect-virt', '--container'],
|
||||
stdout=subprocess.PIPE)
|
||||
return bool(result.stdout.decode('utf-8').lower() != "none\n")
|
||||
|
||||
|
||||
##############################
|
||||
# System -> Config utilities #
|
||||
##############################
|
||||
|
||||
Reference in new issue
Block a user