11
11
import textwrap
12
12
from typing import TYPE_CHECKING , Any , Callable
13
13
14
- import pytest
15
14
import testcontainers .core .container
16
15
import testcontainers .core .waiting_utils
17
16
18
17
from tests .containers import docker_utils
19
18
19
+ import pytest
20
+
20
21
logging .basicConfig (level = logging .DEBUG )
21
22
LOGGER = logging .getLogger (__name__ )
22
23
@@ -72,7 +73,8 @@ def check_elf_file():
72
73
if "not found" in line :
73
74
unsatisfied_deps .append ((dlib , line .strip ()))
74
75
assert output
75
- print ("OUTPUT>" , json .dumps ({"dir" : path , "count_scanned" : count_scanned , "unsatisfied" : unsatisfied_deps }))
76
+ print ("OUTPUT>" ,
77
+ json .dumps ({"dir" : path , "count_scanned" : count_scanned , "unsatisfied" : unsatisfied_deps }))
76
78
77
79
try :
78
80
container .start ()
@@ -117,6 +119,7 @@ def test_oc_command_runs(self, image: str):
117
119
logging .debug (output .decode ())
118
120
assert ecode == 0
119
121
122
+ # @pytest.mark.environmentss("docker")
120
123
def test_oc_command_runs_fake_fips (self , image : str , subtests : pytest_subtests .SubTests ):
121
124
"""Establishes a best-effort fake FIPS environment and attempts to execute `oc` binary in it.
122
125
@@ -140,7 +143,8 @@ def test_oc_command_runs_fake_fips(self, image: str, subtests: pytest_subtests.S
140
143
# if /proc/sys/crypto/fips_enabled exists, only replace this file,
141
144
# otherwise (Ubuntu case), assume entire /proc/sys/crypto does not exist
142
145
if platform .system ().lower () == "darwin" or pathlib .Path ("/proc/sys/crypto/fips_enabled" ).exists ():
143
- container .with_volume_mapping (str (tmp_crypto / 'crypto' / 'fips_enabled' ), "/proc/sys/crypto/fips_enabled" , mode = "ro,z" )
146
+ container .with_volume_mapping (str (tmp_crypto / 'crypto' / 'fips_enabled' ),
147
+ "/proc/sys/crypto/fips_enabled" , mode = "ro,z" )
144
148
else :
145
149
container .with_volume_mapping (str (tmp_crypto ), "/proc/sys" , mode = "ro,z" )
146
150
0 commit comments