From c9af2f45aca98fcf3e5feac3587d597af0c51162 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 6 Sep 2016 14:13:22 -0600 Subject: [PATCH] suite tests: use GitbuilderProject and not ShamanProject Signed-off-by: Zack Cerza --- teuthology/suite/test/test_run_.py | 6 ++++-- teuthology/suite/test/test_util.py | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/teuthology/suite/test/test_run_.py b/teuthology/suite/test/test_run_.py index 693dff5620..c6d87fb174 100644 --- a/teuthology/suite/test/test_run_.py +++ b/teuthology/suite/test/test_run_.py @@ -10,6 +10,7 @@ from StringIO import StringIO from teuthology.config import config, YamlConfig from teuthology.exceptions import ScheduleFailError from teuthology.suite import run +from teuthology import packaging class TestRun(object): @@ -142,6 +143,7 @@ class TestRun(object): m_git_branch_exists, m_fetch_repos, ): + config.use_shaman = False config.gitbuilder_host = 'example.com' m_package_version_for_hash.return_value = 'ceph_hash' m_git_branch_exists.return_value = True @@ -156,7 +158,7 @@ class TestRun(object): } self.args = YamlConfig.from_dict(self.args_dict) with patch.multiple( - 'teuthology.suite.util.GitbuilderProject', + 'teuthology.packaging.GitbuilderProject', _get_package_sha1=DEFAULT, ) as m: assert m != dict() @@ -165,7 +167,7 @@ class TestRun(object): os_type='ubuntu', os_version='16.04', ) - assert run.util.GitbuilderProject('ceph', conf).sha1 == 'SHA1' + assert packaging.GitbuilderProject('ceph', conf).sha1 == 'SHA1' run_ = self.klass(self.args) assert run_.base_config['kernel']['sha1'] == 'SHA1' diff --git a/teuthology/suite/test/test_util.py b/teuthology/suite/test/test_util.py index d20ee83e2c..ae46dc9f8a 100644 --- a/teuthology/suite/test/test_util.py +++ b/teuthology/suite/test/test_util.py @@ -5,6 +5,7 @@ import tempfile from copy import deepcopy from mock import Mock, patch +from teuthology.config import config from teuthology.orchestra.opsys import OS from teuthology.suite import util @@ -37,6 +38,9 @@ def git_repository(request): class TestUtil(object): + def setup(self): + config.use_shaman = False + @patch('requests.get') def test_get_hash_success(self, m_get): mock_resp = Mock() @@ -286,6 +290,8 @@ class TestMissingPackages(object): class TestDistroDefaults(object): + def setup(self): + config.use_shaman = False def test_distro_defaults_saya(self): expected = ('armv7l', 'saucy', -- 2.39.5