Commit 93146c8c authored by Iustin Pop's avatar Iustin Pop
Browse files

Redirect output for gnt-* list/list-fields commands

This enabled the redirection; QA output after this patch should become
much much smaller (on a 'quick' QA, we are left with ~0.5MB output on
stdout and 64MB redirected output).
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent afd5ca04
......@@ -503,7 +503,7 @@ def GenericQueryTest(cmd, fields, namefield="name", test_unknown=True):
# Test a number of field combinations
for testfields in _SelectQueryFields(rnd, fields):
AssertCommand([cmd, "list", "--output", ",".join(testfields)])
AssertRedirectedCommand([cmd, "list", "--output", ",".join(testfields)])
if namefield is not None:
namelist_fn = compat.partial(_List, cmd, [namefield])
......@@ -526,8 +526,9 @@ def GenericQueryTest(cmd, fields, namefield="name", test_unknown=True):
# Check exit code for listing unknown field
AssertEqual(AssertCommand([cmd, "list", "--output=field/does/not/exist"],
AssertEqual(AssertRedirectedCommand([cmd, "list",
......@@ -535,8 +536,8 @@ def GenericQueryFieldsTest(cmd, fields):
master = qa_config.GetMasterNode()
# Listing fields
AssertCommand([cmd, "list-fields"])
AssertCommand([cmd, "list-fields"] + fields)
AssertRedirectedCommand([cmd, "list-fields"])
AssertRedirectedCommand([cmd, "list-fields"] + fields)
# Check listed fields (all, must be sorted)
realcmd = [cmd, "list-fields", "--separator=|", "--no-headers"]
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