]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: use StringIO instead of BytesIO
authorRishabh Dave <ridave@redhat.com>
Tue, 19 Apr 2022 09:24:31 +0000 (14:54 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 27 Apr 2022 09:13:41 +0000 (14:43 +0530)
StringIO can be operated on without extra hassles of converting. So
replace BytesIO by StringIO in test_acls.py and xfstests_dev.py

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/test_acls.py
qa/tasks/cephfs/xfstests_dev.py

index d042c5b16607bf6d2068816a03dd629aaedb04dc..87c95e1329fe8754a838a2985d70a42277397e84 100644 (file)
@@ -1,6 +1,6 @@
 from logging import getLogger
 
-from io import BytesIO
+from io import StringIO
 from tasks.cephfs.xfstests_dev import XFSTestsDev
 
 log = getLogger(__name__)
@@ -22,6 +22,6 @@ class TestACLs(XFSTestsDev):
             log.info('client is kernel mounted')
 
         self.mount_a.client_remote.run(args=['sudo', './check',
-            'generic/099'], cwd=self.repo_path, stdout=BytesIO(),
-            stderr=BytesIO(), timeout=30, check_status=True, omit_sudo=False,
+            'generic/099'], cwd=self.repo_path, stdout=StringIO(),
+            stderr=StringIO(), timeout=30, check_status=True, omit_sudo=False,
             label='running tests for ACLs from xfstests-dev')
index af35227413896b37163c65408bb8566f32ebfc04..de1f860d3d9df4fbd54d7845d813b90cdfb3f856 100644 (file)
@@ -1,4 +1,4 @@
-from io import BytesIO
+from io import StringIO
 from logging import getLogger
 
 from tasks.cephfs.cephfs_test_case import CephFSTestCase
@@ -29,11 +29,11 @@ class XFSTestsDev(CephFSTestCase):
         # NOTE: On teuthology machines it's necessary to run "make" as
         # superuser since the repo is cloned somewhere in /tmp.
         self.mount_a.client_remote.run(args=['sudo', 'make'],
-                                       cwd=self.repo_path, stdout=BytesIO(),
-                                       stderr=BytesIO())
+                                       cwd=self.repo_path, stdout=StringIO(),
+                                       stderr=StringIO())
         self.mount_a.client_remote.run(args=['sudo', 'make', 'install'],
                                        cwd=self.repo_path, omit_sudo=False,
-                                       stdout=BytesIO(), stderr=BytesIO())
+                                       stdout=StringIO(), stderr=StringIO())
 
     def get_repo(self):
         """