diff options
author | knownexus <phillip.smyth@codethink.co.uk> | 2018-09-18 17:06:38 +0100 |
---|---|---|
committer | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-09-18 16:45:09 +0000 |
commit | 89a16e176aed61b1a0af325f5daef25e5b7760eb (patch) | |
tree | d9c3d3188ce1e1b904f4ffd7bd9c10ac68ab9784 /tests/format | |
parent | ba4da3a4806e8f433e210e69d2ee60f247c8d649 (diff) | |
download | buildstream-89a16e176aed61b1a0af325f5daef25e5b7760eb.tar.gz |
Adding test for Invalid Yamlissue-642-Invalid_project.conf_seen_as_missing
Diffstat (limited to 'tests/format')
-rw-r--r-- | tests/format/project.py | 7 | ||||
-rw-r--r-- | tests/format/project/invalid-yaml/manual.bst | 1 | ||||
-rw-r--r-- | tests/format/project/invalid-yaml/project.conf | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/format/project.py b/tests/format/project.py index df1a2364b..214592811 100644 --- a/tests/format/project.py +++ b/tests/format/project.py @@ -41,6 +41,13 @@ def test_invalid_project_name(cli, datafiles): @pytest.mark.datafiles(os.path.join(DATA_DIR)) +def test_invalid_yaml(cli, datafiles): + project = os.path.join(datafiles.dirname, datafiles.basename, "invalid-yaml") + result = cli.run(project=project, args=['workspace', 'list']) + result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_YAML) + + +@pytest.mark.datafiles(os.path.join(DATA_DIR)) def test_load_default_project(cli, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename, "default") result = cli.run(project=project, args=[ diff --git a/tests/format/project/invalid-yaml/manual.bst b/tests/format/project/invalid-yaml/manual.bst new file mode 100644 index 000000000..4d7f70266 --- /dev/null +++ b/tests/format/project/invalid-yaml/manual.bst @@ -0,0 +1 @@ +kind: manual diff --git a/tests/format/project/invalid-yaml/project.conf b/tests/format/project/invalid-yaml/project.conf new file mode 100644 index 000000000..5f9282bbf --- /dev/null +++ b/tests/format/project/invalid-yaml/project.conf @@ -0,0 +1,8 @@ +# Basic project configuration that doesnt override anything +# + +name: pony + +variables: + sbindir: "%{bindir} + |