Import Upstream version 4.12.4
This commit is contained in:
@@ -4,10 +4,14 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from ipaplatform.tasks import tasks
|
||||
|
||||
|
||||
@pytest.mark.skip_if_platform(
|
||||
"debian", reason="Test is specific to platforms using RPM"
|
||||
)
|
||||
def test_ipa_version():
|
||||
v3 = tasks.parse_ipa_version('3.0')
|
||||
assert v3.version == u'3.0'
|
||||
@@ -47,10 +51,10 @@ def test_detect_container():
|
||||
k, v = item.split('=', 1)
|
||||
if k == 'container':
|
||||
container = v
|
||||
elif os.path.isfile("/run/.containerenv"):
|
||||
container = "podman"
|
||||
elif os.path.isfile("/.dockerenv"):
|
||||
container = "docker"
|
||||
|
||||
detected = tasks.detect_container()
|
||||
if container == 'oci':
|
||||
# systemd doesn't know about podman
|
||||
assert detected in {'container-other', container}
|
||||
else:
|
||||
assert detected == container
|
||||
assert detected == container
|
||||
|
||||
Reference in New Issue
Block a user