[ARVADOS] updated: 1.3.0-1181-g1465471da

Git user git at public.curoverse.com
Tue Jul 9 19:48:06 UTC 2019


Summary of changes:
 sdk/python/tests/run_test_server.py      | 2 +-
 services/fuse/tests/test_crunchstat.py   | 2 +-
 services/fuse/tests/test_mount.py        | 8 ++++----
 services/fuse/tests/test_token_expiry.py | 6 +++---
 services/fuse/tests/test_unmount.py      | 6 ++++--
 5 files changed, 13 insertions(+), 11 deletions(-)

       via  1465471dacdc30047c02376cd9800efd07d17974 (commit)
       via  a00c5d23c9f132e9ed1460d19a29a003322a067a (commit)
       via  5e67af9b14890c29bcc62cf1642fb3bc060fe271 (commit)
       via  ddd6e1758457a0206ba715f2c7f3dcd11de56955 (commit)
       via  d9af7924adf05f076f4e422e86ff8c512a2747a3 (commit)
      from  9b994adeeb7fddeea0c9ccba9ba81fabb7ed3d6e (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 1465471dacdc30047c02376cd9800efd07d17974
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 9 15:47:25 2019 -0400

    14965: Fixes token expiry time mock, byte data, and open mock
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/tests/test_token_expiry.py b/services/fuse/tests/test_token_expiry.py
index 8b89e0cc1..040db2e09 100644
--- a/services/fuse/tests/test_token_expiry.py
+++ b/services/fuse/tests/test_token_expiry.py
@@ -33,10 +33,10 @@ class TokenExpiryTest(IntegrationTest):
     def fake_open(self, operations, *args, **kwargs):
         self.time_now += 86400*13
         logger.debug('opening file at time=%f', self.time_now)
-        return self.orig_open(operations, *args, **kwargs)
+        return TokenExpiryTest.orig_open(operations, *args, **kwargs)
 
     @mock.patch.object(arvados_fuse.Operations, 'open', autospec=True)
-    @mock.patch('time.time')
+    @mock.patch.object(time, 'time', return_value=0)
     @mock.patch('arvados.keep.KeepClient.get')
     @IntegrationTest.mount(argv=['--mount-by-id', 'zzz'])
     def test_refresh_old_manifest(self, mocked_get, mocked_time, mocked_open):
@@ -45,7 +45,7 @@ class TokenExpiryTest(IntegrationTest):
         # blobSignatureTtl seconds elapse between open() and
         # read(). See https://dev.arvados.org/issues/10008
 
-        mocked_get.return_value = 'fake data'
+        mocked_get.return_value = b'fake data'
         mocked_time.side_effect = self.fake_time
         mocked_open.side_effect = self.fake_open
 

commit a00c5d23c9f132e9ed1460d19a29a003322a067a
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 9 15:26:07 2019 -0400

    14965: Fixes replace test encoding
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/tests/test_unmount.py b/services/fuse/tests/test_unmount.py
index 8c60f9a0f..e89571087 100644
--- a/services/fuse/tests/test_unmount.py
+++ b/services/fuse/tests/test_unmount.py
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 from __future__ import absolute_import
+from builtins import bytes
 import arvados_fuse.unmount
 import os
 import subprocess
@@ -38,12 +39,13 @@ class UnmountTest(IntegrationTest):
              self.mnt,
              '--exec', 'true'])
         for m in subprocess.check_output(['mount']).splitlines():
-            self.assertNotIn(' '+self.mnt+' ', m)
+            expected = bytes(' ' + self.mnt + ' ', encoding='utf-8')
+            self.assertNotIn(expected, m)
 
     def _mounted(self, mounts):
         all_mounts = subprocess.check_output(['mount'])
         return [m for m in mounts
-                if ' '+m+' ' in all_mounts]
+                if bytes(' ' + m + ' ', encoding='utf-8') in all_mounts]
 
     def _wait_for_mounts(self, mounts):
         deadline = time.time() + 10

commit 5e67af9b14890c29bcc62cf1642fb3bc060fe271
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 9 15:24:18 2019 -0400

    14965: Fixes magic directory test data
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index c7fb0009b..2652142fd 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -169,10 +169,10 @@ class FuseMagicTest(MountTestBase):
             llfuse.listdir(os.path.join(self.mounttmp, 'by_id', self.non_project_group))
 
         files = {}
-        files[os.path.join(self.mounttmp, self.testcollection, 'thing1.txt')] = 'data 1'
+        files[os.path.join(self.mounttmp, self.testcollection, 'thing1.txt')] = b'data 1'
 
         for k, v in viewitems(files):
-            with open(os.path.join(self.mounttmp, k)) as f:
+            with open(os.path.join(self.mounttmp, k), 'rb') as f:
                 self.assertEqual(v, f.read())
 
 
@@ -1166,10 +1166,10 @@ class FuseMagicTestPDHOnly(MountTestBase):
                       llfuse.listdir(os.path.join(self.mounttmp, 'by_id')))
 
         files = {}
-        files[os.path.join(self.mounttmp, self.testcollection, 'thing1.txt')] = 'data 1'
+        files[os.path.join(self.mounttmp, self.testcollection, 'thing1.txt')] = b'data 1'
 
         for k, v in viewitems(files):
-            with open(os.path.join(self.mounttmp, k)) as f:
+            with open(os.path.join(self.mounttmp, k), 'rb') as f:
                 self.assertEqual(v, f.read())
 
         # look up using uuid should fail when pdh_only is set

commit ddd6e1758457a0206ba715f2c7f3dcd11de56955
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 9 14:44:06 2019 -0400

    14965: Fixes crunchstat test assertion
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/services/fuse/tests/test_crunchstat.py b/services/fuse/tests/test_crunchstat.py
index c56cc55f1..3cf15fe11 100644
--- a/services/fuse/tests/test_crunchstat.py
+++ b/services/fuse/tests/test_crunchstat.py
@@ -15,4 +15,4 @@ class CrunchstatTest(IntegrationTest):
              '--crunchstat-interval', '1',
              self.mnt,
              '--exec', 'echo', 'ok'])
-        self.assertEqual("ok\n", output)
+        self.assertEqual(b"ok\n", output)

commit d9af7924adf05f076f4e422e86ff8c512a2747a3
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Jul 9 14:43:02 2019 -0400

    14965: Fixes netstat regex string
    
    Arvados-DCO-1.1-Signed-off-by:  <ebiagiotti at veritasgenetics.com>

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index c845e78f0..786d5a26c 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -190,7 +190,7 @@ def _wait_until_port_listens(port, timeout=10, warn=True):
         return
     deadline = time.time() + timeout
     while time.time() < deadline:
-        if re.search(r'\ntcp.*:'+str(port)+' .* LISTEN *\n', subprocess.check_output(['netstat', '-an'])):
+        if re.search(r'\ntcp.*:'+str(port)+' .* LISTEN *\n', str(subprocess.check_output(['netstat', '-an']))):
             return True
         time.sleep(0.1)
     if warn:

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list