@@ -38,7 +38,15 @@ def test_selinux(self) -> None:
3838 inspect_out = json .loads (out )
3939 create_command_list = inspect_out [0 ].get ("Config" , []).get ("CreateCommand" , [])
4040 host_path = os .path .join (test_path (), "selinux" , "host_test_text.txt" )
41- self .assertIn (f'{ host_path } :/test_text.txt:z' , create_command_list )
41+ try :
42+ # podman-compose.py: prefer_volume_over_mount set to False
43+ self .assertIn (
44+ f'type=bind,source={ host_path } ,destination=/test_text.txt,z' ,
45+ create_command_list ,
46+ )
47+ except AssertionError :
48+ # podman-compose.py: prefer_volume_over_mount set to True
49+ self .assertIn (f'{ host_path } :/test_text.txt:z' , create_command_list )
4250
4351 out , _ = self .run_subprocess_assert_returncode ([
4452 "podman" ,
@@ -48,7 +56,14 @@ def test_selinux(self) -> None:
4856 inspect_out = json .loads (out )
4957 create_command_list = inspect_out [0 ].get ("Config" , []).get ("CreateCommand" , [])
5058 host_path = os .path .join (test_path (), "selinux" , "host_test_text.txt" )
51- self .assertIn (f'{ host_path } :/test_text.txt' , create_command_list )
59+ try :
60+ # podman-compose.py: prefer_volume_over_mount set to False
61+ self .assertIn (
62+ f'type=bind,source={ host_path } ,destination=/test_text.txt' , create_command_list
63+ )
64+ except AssertionError :
65+ # podman-compose.py: prefer_volume_over_mount set to True
66+ self .assertIn (f'{ host_path } :/test_text.txt' , create_command_list )
5267 finally :
5368 out , _ = self .run_subprocess_assert_returncode ([
5469 podman_compose_path (),
0 commit comments