summaryrefslogtreecommitdiff
path: root/tests/frontend/init.py
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-05-11 12:19:50 +0100
committerChandan Singh <csingh43@bloomberg.net>2018-05-11 12:29:45 +0100
commitb9dea6663be401c5afe8494332328509b9425098 (patch)
treebcb52baeae9e8dd6d6b48d852c858eb59e57f668 /tests/frontend/init.py
parent01a02a9a01c31ece723f88327877781a7a0e24fa (diff)
downloadbuildstream-chandan/fix-bst-init-element-path.tar.gz
bst-init: Ensure --element-path is respected by the commandchandan/fix-bst-init-element-path288-kill-element-normal_name-variable
Previously "elements" was hard-coded as the path for the elements directory whereas it was supposed to be configurable via the `element_path` option to `init_project()`. This led to incorrect behavior when `bst init` was run `--element-path` option. Also, extend tests to test the creation of elements directory. Fixes #398.
Diffstat (limited to 'tests/frontend/init.py')
-rw-r--r--tests/frontend/init.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/frontend/init.py b/tests/frontend/init.py
index be7415cf0..8955ae395 100644
--- a/tests/frontend/init.py
+++ b/tests/frontend/init.py
@@ -37,6 +37,9 @@ def test_all_options(cli, tmpdir):
assert project_conf['format-version'] == str(2)
assert project_conf['element-path'] == 'ponies'
+ elements_dir = os.path.join(project, 'ponies')
+ assert os.path.isdir(elements_dir)
+
def test_no_project_name(cli, tmpdir):
result = cli.run(project=str(tmpdir), args=['init'])