diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 21:10:28 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-05 22:14:32 +0900 |
commit | 857751fb6479afa0ee83d4759891f7c4837b87bb (patch) | |
tree | 1f2f9fe26d872e7068a5a523019b5f4e24e5361d /tests | |
parent | 81ec36354812b6f554a20f5c9823415e39080217 (diff) | |
download | buildstream-857751fb6479afa0ee83d4759891f7c4837b87bb.tar.gz |
_loader.py: Some fixes in how we load sources for junctions
o Ensure that we call Source._load_ref(), and consider project.refs this way
o Ensure that we report a warning in the case that project.refs is in use
and the loaded junction source has a redundant ref which is going to
be ignored
o Report more distinct machine readable errors for failures to load
junction element sources
o Handle Consistency.INCONSISTENT and Consistency.RESOLVED separately:
- The user should be told something different depending on whether
they need to fetch or whether they need to track.
- It is never possible to automatically fetch the source in the
case that the source has no ref to begin with.
This also adjusts the test/loader/junctions.py test to expect the new error
Diffstat (limited to 'tests')
-rw-r--r-- | tests/loader/junctions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/loader/junctions.py b/tests/loader/junctions.py index 0634b8aa2..df77e0064 100644 --- a/tests/loader/junctions.py +++ b/tests/loader/junctions.py @@ -221,7 +221,7 @@ def test_git_show(cli, tmpdir, datafiles): assert result.exit_code != 0 assert result.exception assert isinstance(result.exception, LoadError) - assert result.exception.reason == LoadErrorReason.MISSING_FILE + assert result.exception.reason == LoadErrorReason.SUBPROJECT_FETCH_NEEDED # Explicitly fetch subproject result = cli.run(project=project, args=['fetch', 'base.bst']) |