X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Finstall.sh;h=c55691aed6e72871b54b8a33b2436419c68e3c9b;hb=63d8563d811c0a8cee9dcf64dd79e603c0809c81;hp=43229eabbda9c31b2ad1e6ea9fc1f6d8bcbefdd7;hpb=10136757e83e27b4aef1979edd98eb5e278ce6bf;p=releng.git diff --git a/utils/test/testapi/install.sh b/utils/test/testapi/install.sh index 43229eabb..c55691aed 100755 --- a/utils/test/testapi/install.sh +++ b/utils/test/testapi/install.sh @@ -10,9 +10,17 @@ usage: where: -h|--help show this help text" -if [[ $(whoami) != "root" ]]; then - echo "Error: This script must be run as root!" - exit 1 +# Ref :- https://openstack.nimeyo.com/87286/openstack-packaging-all-definition-data-files-config-setup + +if [ -z "$VIRTUAL_ENV" ]; +then + if [[ $(whoami) != "root" ]]; + then + echo "Error: This script must be run as root!" + exit 1 + fi +else + sed -i -e 's#/etc/opnfv_testapi =#etc/opnfv_testapi =#g' setup.cfg fi cp -fr 3rd_party/static opnfv_testapi/tornado_swagger