[ARVADOS] updated: b9b8edc6a4c9f95e167182319f198f5da92745ac

Git user git at public.curoverse.com
Tue Oct 3 09:07:18 EDT 2017


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

       via  b9b8edc6a4c9f95e167182319f198f5da92745ac (commit)
      from  36e23b3761e43231789df66dc441727c000a2ffc (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 b9b8edc6a4c9f95e167182319f198f5da92745ac
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Oct 3 09:03:33 2017 -0400

    8333: Support "myrepo.example:8888/repo/image:tag"
    
    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 4486959..0951651 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -364,7 +364,8 @@ def main(arguments=None, stdout=sys.stdout):
                 "image %r already includes a tag, cannot add tag argument %r",
                 args.image, args.tag)
             sys.exit(1)
-        args.image, args.tag = args.image.split(':', 1)
+        # rsplit() accommodates "myrepo.example:8888/repo/image:tag"
+        args.image, args.tag = args.image.rsplit(':', 1)
     elif args.tag is None:
         args.tag = 'latest'
 
diff --git a/sdk/python/tests/test_arv_keepdocker.py b/sdk/python/tests/test_arv_keepdocker.py
index bf22860..777d762 100644
--- a/sdk/python/tests/test_arv_keepdocker.py
+++ b/sdk/python/tests/test_arv_keepdocker.py
@@ -130,3 +130,9 @@ class ArvKeepdockerTestCase(unittest.TestCase, tutil.VersionChecker):
                         side_effect=StopTest) as find_image_mock:
             self.run_arv_keepdocker(['repo:tag'], sys.stderr)
         find_image_mock.assert_called_with('repo', 'tag')
+
+        with self.assertRaises(StopTest), \
+             mock.patch('arvados.commands.keepdocker.find_one_image_hash',
+                        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')

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list