[PATCH] issue#433: Fix fake url for repository test

From: Royce Lv <lvroyce@linux.vnet.ibm.com> When using apt, the base url needs to be validated, a fake url will be rejected by kimchi, causing: Traceback (most recent call last): File "../kimchi/tests/test_model.py", line 1443, in test_repository_disable_enable repo_id = inst.repositories_create(repo) File "../kimchi/src/kimchi/model/host.py", line 406, in create return self.host_repositories.addRepository(params) File "../kimchi/src/kimchi/repositories.py", line 54, in addRepository return self._pkg_mnger.addRepo(params) File "../kimchi/src/kimchi/repositories.py", line 426, in addRepo validate_repo_url(uri) File "../kimchi/src/kimchi/utils.py", line 307, in validate_repo_url raise InvalidParameter("KCHUTILS0001E", {'uri': url}) InvalidParameter: KCHUTILS0001E: Invalid URI http://br.archive.ubuntu.com/kimchi/fake So give a valid url in testcase instead of a fake one. Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com> --- tests/test_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_model.py b/tests/test_model.py index 0a709a7..81fa062 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -1290,9 +1290,9 @@ class ModelTests(unittest.TestCase): {'mirrorlist': 'http://www.fedoraproject.org', 'gpgkey': 'file:///tmp/KEY-fedora-updates-fake-19'}}] - deb_repos = [{'baseurl': 'http://br.archive.ubuntu.com/kimchi/fake', + deb_repos = [{'baseurl': 'http://br.archive.ubuntu.com/ubuntu/', 'config': {'dist': 'quantal'}}, - {'baseurl': 'http://br.archive.kimchi.com/ubuntu/fake', + {'baseurl': 'http://br.archive.ubuntu.com/ubuntu/', 'config': {'dist': 'quantal', 'comps': ['main']}}] repo_type = inst.capabilities_lookup()['repo_mngt_tool'] -- 1.8.3.2
participants (1)
-
lvroyce@linux.vnet.ibm.com