Phillip Smyth pushed to branch element-path_not_validated at BuildStream / buildstream
Commits:
-
f515cb73
by Phillip Smyth at 2018-11-07T13:14:49Z
2 changed files:
Changes:
1 |
+# Project config for frontend build test
|
|
2 |
+name: test
|
|
3 |
+ |
|
4 |
+elephant-path: elements
|
... | ... | @@ -36,6 +36,19 @@ def test_show(cli, datafiles, target, format, expected): |
36 | 36 |
.format(expected, result.output))
|
37 | 37 |
|
38 | 38 |
|
39 |
+@pytest.mark.datafiles(os.path.join(
|
|
40 |
+ os.path.dirname(os.path.realpath(__file__)),
|
|
41 |
+ "invalid_element_path",
|
|
42 |
+))
|
|
43 |
+def test_show_invalid_element_path(cli, datafiles):
|
|
44 |
+ project = os.path.join(datafiles.dirname, datafiles.basename)
|
|
45 |
+ result = cli.run(project=project, silent=True, args=[
|
|
46 |
+ 'show',
|
|
47 |
+ "foo.bst"])
|
|
48 |
+ |
|
49 |
+ result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
|
|
50 |
+ |
|
51 |
+ |
|
39 | 52 |
@pytest.mark.datafiles(DATA_DIR)
|
40 | 53 |
@pytest.mark.parametrize("target,except_,expected", [
|
41 | 54 |
('target.bst', 'import-bin.bst', ['import-dev.bst', 'compose-all.bst', 'target.bst']),
|