clarify obsoleted test configuration files 75/40675/3
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Wed, 30 Aug 2017 08:33:31 +0000 (16:33 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Mon, 4 Sep 2017 02:34:06 +0000 (10:34 +0800)
delete noparam.ini/nosection.ini/notboolean.ini/notint.ini/normal.ini
substitute normal.ini with etc/config.ini

Change-Id: I7e2fa331736a2f9bf807814416a3118be5f613e5
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini [deleted file]
utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini [deleted file]
utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini [deleted file]
utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini [deleted file]
utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini [deleted file]
utils/test/testapi/opnfv_testapi/tests/unit/conftest.py
utils/test/testapi/opnfv_testapi/tests/unit/resources/test_base.py

diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini b/utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini
deleted file mode 100644 (file)
index be7f2b9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# to add a new parameter in the config file,
-# the CONF object in config.ini must be updated
-[mongo]
-# URL of the mongo DB
-# Mongo auth url => mongodb://user1:pwd1@host1/?authSource=db1
-url = mongodb://127.0.0.1:27017/
-
-[api]
-# Listening port
-port = 8000
-# With debug_on set to true, error traces will be shown in HTTP responses
-debug = True
-authenticate = False
-
-[ui]
-url = http://localhost:8000
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini b/utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini
deleted file mode 100644 (file)
index c81c6c5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# to add a new parameter in the config file,
-# the CONF object in config.ini must be updated
-[mongo]
-# URL of the mongo DB
-# Mongo auth url => mongodb://user1:pwd1@host1/?authSource=db1
-url = mongodb://127.0.0.1:27017/
-dbname = test_results_collection
-
-[api]
-# Listening port
-port = 8000
-# With debug_on set to true, error traces will be shown in HTTP responses
-debug = True
-authenticate = False
-
-[ui]
-url = http://localhost:8000
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini b/utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini
deleted file mode 100644 (file)
index a9ed49c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# to add a new parameter in the config file,
-# the CONF object in config.ini must be updated
-[api]
-# Listening port
-port = 8000
-# With debug_on set to true, error traces will be shown in HTTP responses
-debug = True
-authenticate = False
-
-[ui]
-url = http://localhost:8000
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini b/utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini
deleted file mode 100644 (file)
index 3a11f9d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# to add a new parameter in the config file,
-# the CONF object in config.ini must be updated
-[mongo]
-# URL of the mongo DB
-# Mongo auth url => mongodb://user1:pwd1@host1/?authSource=db1
-url = mongodb://127.0.0.1:27017/
-dbname = test_results_collection
-
-[api]
-# Listening port
-port = 8000
-# With debug_on set to true, error traces will be shown in HTTP responses
-debug = True
-authenticate = notboolean
-
-[ui]
-url = http://localhost:8000
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini b/utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini
deleted file mode 100644 (file)
index 8180719..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# to add a new parameter in the config file,
-# the CONF object in config.ini must be updated
-[mongo]
-# URL of the mongo DB
-# Mongo auth url => mongodb://user1:pwd1@host1/?authSource=db1
-url = mongodb://127.0.0.1:27017/
-dbname = test_results_collection
-
-[api]
-# Listening port
-port = notint
-# With debug_on set to true, error traces will be shown in HTTP responses
-debug = True
-authenticate = False
-
-[ui]
-url = http://localhost:8000
index feff1da..75e621d 100644 (file)
@@ -5,4 +5,4 @@ import pytest
 
 @pytest.fixture
 def config_normal():
-    return path.join(path.dirname(__file__), 'common/normal.ini')
+    return path.join(path.dirname(__file__), '../../../etc/config.ini')
index 77a8d18..39633e5 100644 (file)
@@ -37,7 +37,8 @@ class TestBase(testing.AsyncHTTPTestCase):
 
     def _patch_server(self):
         import argparse
-        config = path.join(path.dirname(__file__), '../common/normal.ini')
+        config = path.join(path.dirname(__file__),
+                           '../../../../etc/config.ini')
         self.config_patcher = mock.patch(
             'argparse.ArgumentParser.parse_known_args',
             return_value=(argparse.Namespace(config_file=config), None))
@@ -46,9 +47,6 @@ class TestBase(testing.AsyncHTTPTestCase):
         self.config_patcher.start()
         self.db_patcher.start()
 
-    def set_config_file(self):
-        self.config_file = 'normal.ini'
-
     def get_app(self):
         from opnfv_testapi.cmd import server
         return server.make_app()