Commit de881c2a authored by Tristan Van Berkom's avatar Tristan Van Berkom

tests: Migrate preflight error handling check to tests/format/project.py

This is where other load time related plugin error handling is
checked, and is the last thing to remove in the `tests/pipeline`
directory.
parent 8f2b4e9a
......@@ -187,6 +187,13 @@ def test_project_plugin_no_load_ref(cli, datafiles, ref_storage):
result.assert_main_error(ErrorDomain.SOURCE, 'unsupported-load-ref')
@pytest.mark.datafiles(DATA_DIR)
def test_project_plugin_preflight_error(cli, datafiles, tmpdir):
project = os.path.join(datafiles.dirname, datafiles.basename, 'plugin-preflight-error')
result = cli.run(project=project, args=['source', 'fetch', 'error.bst'])
result.assert_main_error(ErrorDomain.SOURCE, "the-preflight-error")
@pytest.mark.datafiles(DATA_DIR)
def test_project_conf_duplicate_plugins(cli, datafiles):
project = os.path.join(datafiles.dirname, datafiles.basename, 'duplicate-plugins')
......
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=['source', 'fetch', 'error.bst'])
result.assert_main_error(ErrorDomain.SOURCE, "the-preflight-error")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment