[ARVADOS] updated: 5832cd21b303fcffa4ff84390a046019274bc7cb

Git user git at public.curoverse.com
Tue Oct 3 09:16:36 EDT 2017


Summary of changes:
 sdk/python/arvados/commands/keepdocker.py |  3 ++-
 sdk/python/tests/test_arv_keepdocker.py   | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

       via  5832cd21b303fcffa4ff84390a046019274bc7cb (commit)
      from  b9b8edc6a4c9f95e167182319f198f5da92745ac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5832cd21b303fcffa4ff84390a046019274bc7cb
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Oct 3 09:15:24 2017 -0400

    8333: Support "myrepo.example:8888/repo/image"
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/python/arvados/commands/keepdocker.py b/sdk/python/arvados/commands/keepdocker.py
index 0951651..ea85b35 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -358,7 +358,8 @@ def main(arguments=None, stdout=sys.stdout):
                 raise
         sys.exit(0)
 
-    if ':' in args.image:
+    if re.search(r':\w[-.\w]{0,127}$', args.image):
+        # image ends with :valid-tag
         if args.tag is not None:
             logger.error(
                 "image %r already includes a tag, cannot add tag argument %r",
diff --git a/sdk/python/tests/test_arv_keepdocker.py b/sdk/python/tests/test_arv_keepdocker.py
index 777d762..695a038 100644
--- a/sdk/python/tests/test_arv_keepdocker.py
+++ b/sdk/python/tests/test_arv_keepdocker.py
@@ -136,3 +136,16 @@ class ArvKeepdockerTestCase(unittest.TestCase, tutil.VersionChecker):
                         side_effect=StopTest) as find_image_mock:
             self.run_arv_keepdocker(['myreg.example:8888/repo/img:tag'], sys.stderr)
         find_image_mock.assert_called_with('myreg.example:8888/repo/img', 'tag')
+
+    def test_image_has_colons(self):
+        with self.assertRaises(StopTest), \
+             mock.patch('arvados.commands.keepdocker.find_one_image_hash',
+                        side_effect=StopTest) as find_image_mock:
+            self.run_arv_keepdocker(['[::1]:8888/repo/img'], sys.stderr)
+        find_image_mock.assert_called_with('[::1]:8888/repo/img', 'latest')
+
+        with self.assertRaises(StopTest), \
+             mock.patch('arvados.commands.keepdocker.find_one_image_hash',
+                        side_effect=StopTest) as find_image_mock:
+            self.run_arv_keepdocker(['[::1]/repo/img'], sys.stderr)
+        find_image_mock.assert_called_with('[::1]/repo/img', 'latest')

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list