summaryrefslogtreecommitdiff
path: root/tests/sources
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2018-07-31 12:39:17 +0100
committerTiago Gomes <tiago.avv@gmail.com>2018-08-02 11:24:43 +0000
commit33292be4618b83147258e729a44caa58859e4ba2 (patch)
tree9af95e3e64eb4b6818b1b7d40f17dc94d2caaf52 /tests/sources
parente788bda4969de17178f3facc0d31b36c91121402 (diff)
downloadbuildstream-33292be4618b83147258e729a44caa58859e4ba2.tar.gz
local plugin: validate project paths
The autotools example had to be copied over inside of the junction example, as referring to a path outside of the project directory is now disallowed.
Diffstat (limited to 'tests/sources')
-rw-r--r--tests/sources/local.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sources/local.py b/tests/sources/local.py
index 9dfb5f972..8d2307e27 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -1,7 +1,7 @@
import os
import pytest
-from buildstream._exceptions import ErrorDomain
+from buildstream._exceptions import ErrorDomain, LoadErrorReason
from tests.testutils import cli
DATA_DIR = os.path.join(
@@ -15,13 +15,13 @@ def test_missing_file(cli, tmpdir, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename)
# Removing the local file causes preflight to fail
- localfile = os.path.join(datafiles.dirname, datafiles.basename, 'file.txt')
+ localfile = os.path.join(project, 'file.txt')
os.remove(localfile)
result = cli.run(project=project, args=[
'show', 'target.bst'
])
- result.assert_main_error(ErrorDomain.SOURCE, None)
+ result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.MISSING_FILE)
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'basic'))