[ARVADOS] updated: 2.1.0-1637-g4d68e45df

Git user git at public.arvados.org
Wed Nov 17 21:59:22 UTC 2021


Summary of changes:
 sdk/python/tests/test_arv_copy.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

       via  4d68e45dff39d6635658ec85079422bab942fda2 (commit)
      from  972272c42f7ad8daaef29d3d981968e566f3f087 (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 4d68e45dff39d6635658ec85079422bab942fda2
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Nov 17 16:58:59 2021 -0500

    17962: Add test that uuid of project is printed on stdout
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/python/tests/test_arv_copy.py b/sdk/python/tests/test_arv_copy.py
index b560018d3..b853b3304 100644
--- a/sdk/python/tests/test_arv_copy.py
+++ b/sdk/python/tests/test_arv_copy.py
@@ -61,10 +61,13 @@ class ArvCopyVersionTestCase(run_test_server.TestCaseWithServers, tutil.VersionC
             contents = api.groups().list(filters=[["owner_uuid", "=", dest_proj]]).execute()
             assert len(contents["items"]) == 0
 
-            try:
-                self.run_copy(["--project-uuid", dest_proj, "--storage-classes", "foo", src_proj])
-            except SystemExit as e:
-                assert e.code == 0
+            with tutil.redirected_streams(
+                    stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
+                try:
+                    self.run_copy(["--project-uuid", dest_proj, "--storage-classes", "foo", src_proj])
+                except SystemExit as e:
+                    assert e.code == 0
+                copy_uuid_from_stdout = out.getvalue().strip()
 
             contents = api.groups().list(filters=[["owner_uuid", "=", dest_proj]]).execute()
             assert len(contents["items"]) == 1
@@ -72,6 +75,8 @@ class ArvCopyVersionTestCase(run_test_server.TestCaseWithServers, tutil.VersionC
             assert contents["items"][0]["name"] == "arv-copy project"
             copied_project = contents["items"][0]["uuid"]
 
+            assert copied_project == copy_uuid_from_stdout
+
             contents = api.collections().list(filters=[["owner_uuid", "=", copied_project]]).execute()
             assert len(contents["items"]) == 1
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list