diff options
Diffstat (limited to 'tests/sources/git.py')
-rw-r--r-- | tests/sources/git.py | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/tests/sources/git.py b/tests/sources/git.py index ef18e3ce3..781d6d4d1 100644 --- a/tests/sources/git.py +++ b/tests/sources/git.py @@ -1,3 +1,25 @@ +# +# Copyright (C) 2018 Codethink Limited +# Copyright (C) 2018 Bloomberg Finance LP +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see <http://www.gnu.org/licenses/>. +# +# Authors: Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> +# Jonathan Maw <jonathan.maw@codethink.co.uk> +# William Salmon <will.salmon@codethink.co.uk> +# + import os import pytest @@ -383,21 +405,6 @@ def test_submodule_track_no_ref_or_track(cli, tmpdir, datafiles): _yaml.dump(element, os.path.join(project, 'target.bst')) # Track will encounter an inconsistent submodule without any ref - result = cli.run(project=project, args=['track', 'target.bst']) - result.assert_main_error(ErrorDomain.STREAM, None) - result.assert_task_error(ErrorDomain.SOURCE, 'track-attempt-no-track') - - # Assert that we are just fine without it, and emit a warning to the user. - assert "FAILURE git source at" in result.stderr - assert "Without a tracking branch ref can not be updated. Please " + \ - "provide a ref or a track." in result.stderr - - # Track will encounter an inconsistent submodule without any ref - result = cli.run(project=project, args=['build', 'target.bst']) - result.assert_main_error(ErrorDomain.PIPELINE, 'inconsistent-pipeline') + result = cli.run(project=project, args=['show', 'target.bst']) + result.assert_main_error(ErrorDomain.SOURCE, "missing-track-and-ref") result.assert_task_error(None, None) - - # Assert that we are just fine without it, and emit a warning to the user. - assert "Exact versions are missing for the following elements" in result.stderr - assert "is missing ref and track." in result.stderr - assert "Then track these elements with `bst track`" in result.stderr |