diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2018-09-04 14:24:27 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2018-09-04 15:33:15 +0100 |
commit | c34ea67cd0110a8401c6e48db0e138f272d7a168 (patch) | |
tree | ab2b6cf9ab3899b8bdd8f1c4353a69088f1aa89c | |
parent | 6a0cdedf0b2d5f17fcacddbb7c398d288111457f (diff) | |
download | buildstream-c34ea67cd0110a8401c6e48db0e138f272d7a168.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.py | 5 |
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) |