utils.ShellQuoteArgs(cmd)).splitlines()
-def GenericQueryTest(cmd, fields, namefield="name", test_unknown=True):
+def _AssertListNoUnknownValues(listcmd, fields):
+ """Assert that the list command does not output unknown values.
+
+ """
+ master = qa_config.GetMasterNode()
+
+ cmd = [listcmd, "list", "--output", ",".join(fields)]
+
+ output = GetCommandOutput(master.primary,
+ utils.ShellQuoteArgs(cmd)).splitlines()
+ for line in output:
+ AssertNotIn('?', line)
+
+
+def GenericQueryTest(cmd, fields, namefield="name", test_unknown=True,
+ test_values_unknown=True):
"""Runs a number of tests on query commands.
@param cmd: Command name
AssertCommand([cmd, "list", "this.name.certainly.does.not.exist"],
fail=True)
+ if test_values_unknown:
+ _AssertListNoUnknownValues(cmd, fields)
+
# Check exit code for listing unknown field
AssertEqual(AssertRedirectedCommand([cmd, "list",
"--output=field/does/not/exist"],