]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
minor fix: run tests in python venv 34352/head
authorShilpa Jagannath <smanjara@redhat.com>
Thu, 30 Apr 2020 07:07:33 +0000 (12:37 +0530)
committerShilpa Jagannath <smanjara@redhat.com>
Thu, 30 Apr 2020 07:09:50 +0000 (12:39 +0530)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
qa/suites/rgw/verify/tasks/reshard.yaml
qa/workunits/rgw/run-reshard.sh [new file with mode: 0755]
qa/workunits/rgw/test_rgw_reshard.py

index 6e7605b13ec43f677508d1baaa4ad7ff1380eebd..db65af36a22b3846a92b7cea7dfaede94c7ea589 100644 (file)
@@ -2,4 +2,4 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - rgw/test_rgw_reshard.py
\ No newline at end of file
+        - rgw/run-reshard.sh
diff --git a/qa/workunits/rgw/run-reshard.sh b/qa/workunits/rgw/run-reshard.sh
new file mode 100755 (executable)
index 0000000..42c97ce
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+set -ex
+
+#assume working ceph environment (radosgw-admin in path) and rgw on localhost:80
+
+mydir=`dirname $0`
+
+python3 -m venv $mydir
+source $mydir/bin/activate
+pip install pip --upgrade
+pip install boto3
+
+## run test
+$mydir/bin/python3 $mydir/test_rgw_reshard.py
+
+deactivate
+echo OK.
+
index 75da55ef96e3c6dea383a58c730da45f613d98cf..c69b305e98281564ccc1c12bf4ec9c1f5bd7cdd6 100755 (executable)
@@ -48,21 +48,6 @@ def exec_cmd(cmd):
         return False
 
 
-def install_reqs():
-    out = exec_cmd('cat /etc/*release')
-    result = {}
-    for row in out.decode('utf8').split('\n'):
-        if '=' in row:
-            k, v = row.split('=')
-            result[k.strip()] = v.strip('""')
-    if result['NAME'] == 'Ubuntu':
-        exec_cmd('sudo apt install -y python3-pip')
-    else:
-        exec_cmd('sudo yum install -y python3-pip')
-    exec_cmd('sudo pip3 install boto3')
-
-
-install_reqs()
 import boto3