summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2018-09-04 14:24:27 +0100
committerrichardmaw-codethink <richard.maw@codethink.co.uk>2018-09-14 10:28:17 +0000
commite742746272f31f9e2433999af6d7846fca360717 (patch)
treed9066678d280364d9c05b57d772ed023b3d8517c
parentf86ab8f6f5623da2988ab1ea7b83e8a655632177 (diff)
downloadbuildstream-e742746272f31f9e2433999af6d7846fca360717.tar.gz
tests: Use cli.configure for custom logging test
Overriding the config with a custom config file on the command-line prevents it merging in the test-specific configuration and can permit it to attempt to initialise the user's cache.
-rw-r--r--tests/frontend/logging.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index 4c70895a5..733c7e85d 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -54,8 +54,7 @@ def test_custom_logging(cli, tmpdir, datafiles):
custom_log_format = '%{elapsed},%{elapsed-us},%{wallclock},%{key},%{element},%{action},%{message}'
user_config = {'logging': {'message-format': custom_log_format}}
- user_config_file = str(tmpdir.join('buildstream.conf'))
- _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file)
+ cli.configure(user_config)
# Create our repo object of the given source type with
# the bin files, and then collect the initial ref.
@@ -75,7 +74,7 @@ def test_custom_logging(cli, tmpdir, datafiles):
element_name))
# Now try to fetch it
- result = cli.run(project=project, args=['-c', user_config_file, 'fetch', element_name])
+ result = cli.run(project=project, args=['fetch', element_name])
result.assert_success()
m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr)