2022-02-26 01:10:35 +01:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from podman_compose import parse_short_mount
|
|
|
|
|
2022-03-01 08:53:24 +01:00
|
|
|
|
2022-02-26 01:10:35 +01:00
|
|
|
@pytest.fixture
|
|
|
|
def multi_propagation_mount_str():
|
|
|
|
return "/foo/bar:/baz:U,Z"
|
|
|
|
|
|
|
|
|
|
|
|
def test_parse_short_mount_multi_propagation(multi_propagation_mount_str):
|
|
|
|
expected = {
|
|
|
|
"type": "bind",
|
|
|
|
"source": "/foo/bar",
|
|
|
|
"target": "/baz",
|
|
|
|
"bind": {
|
|
|
|
"propagation": "U,Z",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
assert parse_short_mount(multi_propagation_mount_str, "/") == expected
|