Bugfix: make security_scan authorized
authorLinda Wang <wangwulin@huawei.com>
Fri, 3 Mar 2017 07:19:08 +0000 (07:19 +0000)
committerLinda Wang <wangwulin@huawei.com>
Fri, 3 Mar 2017 08:02:09 +0000 (08:02 +0000)
JIRA: FUNCTEST-732

"OS_AUTH_URL" in the file "stackrc" in undercloud is needed when
trying to obtain controller and compute nodes of openstack.
Thus, when running the security_scan.py, source stackrc is needed.
This patch will make security_scan work in CI until the patch in
securityscanning repo is merged:
https://gerrit.opnfv.org/gerrit/#/c/29705/

Change-Id: I379c3a71522973887d1ea698ab1df761354e6c36
Signed-off-by: Linda Wang <wangwulin@huawei.com>
functest/opnfv_tests/features/security_scan.py

index 2db4417..58f0ec7 100755 (executable)
@@ -17,8 +17,8 @@ class SecurityScan(base.FeatureBase):
         super(SecurityScan, self).__init__(project='securityscanning',
                                            case='security_scan',
                                            repo='dir_repo_securityscan')
-        self.cmd = ('bash {0} && '
+        self.cmd = ('. {0}/stackrc && '
                     'cd {1} && '
                     'python security_scan.py --config config.ini && '
-                    'cd -'.format(CONST.openstack_creds,
+                    'cd -'.format(CONST.dir_functest_conf,
                                   self.repo))