summaryrefslogtreecommitdiff
path: root/tests/pipeline/preflight.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-06 18:39:05 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-06 19:26:43 +0900
commitd35896e1897329d4715ba65a25074f6710bbf765 (patch)
tree64fb66a13295292f5f348b6df4a7f6e64b0fac73 /tests/pipeline/preflight.py
parentf1183059abac95ba1f90a54ba02b69326cefe84d (diff)
downloadbuildstream-fix-preflight-errors.tar.gz
tests/pipeline/preflight.py: Added test to ensure graceful exit at preflight error timefix-preflight-errors
Diffstat (limited to 'tests/pipeline/preflight.py')
-rw-r--r--tests/pipeline/preflight.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pipeline/preflight.py b/tests/pipeline/preflight.py
new file mode 100644
index 000000000..f9eb649ff
--- /dev/null
+++ b/tests/pipeline/preflight.py
@@ -0,0 +1,19 @@
+import os
+import pytest
+
+from buildstream._exceptions import ErrorDomain
+from tests.testutils.runcli import cli
+
+DATA_DIR = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)),
+ 'preflight-error',
+)
+
+
+@pytest.mark.datafiles(DATA_DIR)
+def test_load_simple(cli, datafiles, tmpdir):
+ basedir = os.path.join(datafiles.dirname, datafiles.basename)
+
+ # Lets try to fetch it...
+ result = cli.run(project=basedir, args=['fetch', 'error.bst'])
+ result.assert_main_error(ErrorDomain.PIPELINE, "the-preflight-error")