Commit 7ab8b7d7 authored by Adeodato Simo's avatar Adeodato Simo
Browse files reimplement query tests with qa_utils

Now that group queries use query2 infrastructure, update the QA tests to
use the generic functions in
Signed-off-by: default avatarAdeodato Simo <>
Reviewed-by: default avatarIustin Pop <>
parent d8b7ff5f
......@@ -250,8 +250,8 @@ def RunGroupListTests():
"""Run tests for listing node groups.
RunTestIf("group-list", qa_group.TestGroupListDefaultFields)
RunTestIf("group-list", qa_group.TestGroupListAllFields)
RunTestIf("group-list", qa_group.TestGroupList)
RunTestIf("group-list", qa_group.TestGroupListFields)
def RunGroupRwTests():
......@@ -20,8 +20,11 @@
from ganeti import constants
from ganeti import query
import qa_config
import qa_utils
from qa_utils import AssertCommand
......@@ -83,12 +86,11 @@ def TestGroupModify():
AssertCommand(["gnt-group", "remove", group1])
def TestGroupListDefaultFields():
def TestGroupList():
"""gnt-group list"""
AssertCommand(["gnt-group", "list"])
qa_utils.GenericQueryTest("gnt-group", query.GROUP_FIELDS.keys())
def TestGroupListAllFields():
"""gnt-group list -o FIELDS"""
AssertCommand(["gnt-group", "list", "-o",
def TestGroupListFields():
"""gnt-group list-fields"""
qa_utils.GenericQueryFieldsTest("gnt-group", query.GROUP_FIELDS.keys())
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