]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
GitbuilderProject tests: also test for the right log msg 898/head
authorDan Mick <dan.mick@redhat.com>
Wed, 29 Jun 2016 23:55:15 +0000 (16:55 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 30 Jun 2016 18:24:58 +0000 (11:24 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/test/test_packaging.py

index 7e1ac2364ff5e2a97aafff9de58ca60318da32ce..3bd115d000cf0080f4903577d13c439036539c14 100644 (file)
@@ -387,7 +387,7 @@ class TestGitbuilderProject(object):
         assert result == expected
 
     @patch("teuthology.packaging.config")
-    def test_init_from_config_tag_overrides_branch_ref(self, m_config):
+    def test_init_from_config_tag_overrides_branch_ref(self, m_config, caplog):
         m_config.baseurl_template = \
             'http://{host}/{proj}-{pkg_type}-{dist}-{arch}-{flavor}/{uri}'
         m_config.gitbuilder_host = "gitbuilder.ceph.com"
@@ -401,6 +401,8 @@ class TestGitbuilderProject(object):
         result = gp.uri_reference
         expected = 'ref/v10.0.1'
         assert result == expected
+        expected_log = 'More than one of ref, tag, branch, or sha1 supplied; using tag'
+        assert expected_log in caplog.text()
 
     @patch("teuthology.packaging.config")
     @patch("teuthology.packaging._get_config_value_for_remote")