merge swagger_base_url with ui_url 25/38125/2
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Wed, 26 Jul 2017 06:40:56 +0000 (14:40 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Wed, 26 Jul 2017 06:47:38 +0000 (14:47 +0800)
TestAPI used to have only one webpage, which is swagger_ui,
now a new one webportal is added, and the base url is the same
(http://testresults.opnfv.org/test)for them both.
This patch aim to unify the urls.

Change-Id: I15295975fb05f7e8c8d413e12b2b5c0784f0799a
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
utils/test/testapi/docker/prepare-env.sh
utils/test/testapi/etc/config.ini
utils/test/testapi/opnfv_testapi/cmd/server.py
utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/test_config.py

index 4f1be7d..b14bc24 100755 (executable)
@@ -8,7 +8,6 @@ fi
 
 if [ "$base_url" != "" ]; then
     sudo crudini --set --existing $FILE api url $base_url/api/v1
-    sudo crudini --set --existing $FILE swagger base_url $base_url
     sudo crudini --set --existing $FILE ui url $base_url
     sudo echo "{\"testapiApiUrl\": \"$base_url/api/v1\"}" > \
         /usr/local/lib/python2.7/dist-packages/opnfv_testapi/static/testapi-ui/config.json
index 435188d..1ec899f 100644 (file)
@@ -18,9 +18,6 @@ results_per_page = 20
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
-
 [ui]
 url = http://localhost:8000
 
index a5ac5eb..50ac049 100644 (file)
@@ -37,7 +37,7 @@ from opnfv_testapi.tornado_swagger import swagger
 
 
 def make_app():
-    swagger.docs(base_url=CONF.swagger_base_url,
+    swagger.docs(base_url=CONF.ui_url,
                  static_path=CONF.static_path)
     return swagger.Application(
         url_mappings.mappings,
index fda2a09..be7f2b9 100644 (file)
@@ -12,5 +12,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 77cc6c6..c81c6c5 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 9988fc0..a9ed49c 100644 (file)
@@ -7,5 +7,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index b3f3276..3a11f9d 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = notboolean
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index d1b752a..8180719 100644 (file)
@@ -13,5 +13,5 @@ port = notint
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index cc8743c..8cfc513 100644 (file)
@@ -12,4 +12,4 @@ def test_config_normal(mocker, config_normal):
     assert CONF.api_port == 8000
     assert CONF.api_debug is True
     assert CONF.api_authenticate is False
-    assert CONF.swagger_base_url == 'http://localhost:8000'
+    assert CONF.ui_url == 'http://localhost:8000'