diff --git a/qa/suites/rgw/verify/tasks/reshard.yaml b/qa/suites/rgw/verify/tasks/reshard.yaml index 6e7605b13ec..db65af36a22 100644 --- a/qa/suites/rgw/verify/tasks/reshard.yaml +++ b/qa/suites/rgw/verify/tasks/reshard.yaml @@ -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 index 00000000000..42c97ce9d02 --- /dev/null +++ b/qa/workunits/rgw/run-reshard.sh @@ -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. + diff --git a/qa/workunits/rgw/test_rgw_reshard.py b/qa/workunits/rgw/test_rgw_reshard.py index 75da55ef96e..c69b305e982 100755 --- a/qa/workunits/rgw/test_rgw_reshard.py +++ b/qa/workunits/rgw/test_rgw_reshard.py @@ -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