mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
minor fix: run tests in python venv
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
This commit is contained in:
parent
0270dc4aaa
commit
71b657b9d2
@ -2,4 +2,4 @@ tasks:
|
||||
- workunit:
|
||||
clients:
|
||||
client.0:
|
||||
- rgw/test_rgw_reshard.py
|
||||
- rgw/run-reshard.sh
|
||||
|
18
qa/workunits/rgw/run-reshard.sh
Executable file
18
qa/workunits/rgw/run-reshard.sh
Executable file
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user