mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-06 07:30:40 +00:00
fix: --mount
should accept service names with hyphens
(no changelog entry, as this fixes a feature that hasn't yet been released)
This commit is contained in:
parent
5a81b6a6cb
commit
126c6062e5
@ -26,5 +26,12 @@ class ComposeTests(unittest.TestCase):
|
||||
],
|
||||
param("lms, cms:/path/to/edx-platform:/openedx/edx-platform"),
|
||||
)
|
||||
self.assertEqual(
|
||||
[
|
||||
("lms", "/path/to/edx-platform", "/openedx/edx-platform"),
|
||||
("lms-worker", "/path/to/edx-platform", "/openedx/edx-platform"),
|
||||
],
|
||||
param("lms,lms-worker:/path/to/edx-platform:/openedx/edx-platform"),
|
||||
)
|
||||
with self.assertRaises(ClickException):
|
||||
param("lms,:/path/to/edx-platform:/openedx/edx-platform")
|
||||
|
@ -102,7 +102,7 @@ class MountParam(click.ParamType):
|
||||
MountType = t.Tuple[str, str, str]
|
||||
# Note that this syntax does not allow us to include colon ':' characters in paths
|
||||
PARAM_REGEXP = (
|
||||
r"(?P<services>[a-zA-Z0-9_, ]+):(?P<host_path>[^:]+):(?P<container_path>[^:]+)"
|
||||
r"(?P<services>[a-zA-Z0-9-_, ]+):(?P<host_path>[^:]+):(?P<container_path>[^:]+)"
|
||||
)
|
||||
|
||||
def convert(
|
||||
|
Loading…
Reference in New Issue
Block a user