On Mon, Jan 08, 2018 at 01:03:00 -0200, Julio Faracco wrote:
This commit adds a domrename test case inside the 'virshtest'
test for
test driver.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
tests/virshtest.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/virshtest.c b/tests/virshtest.c
index 67453bd..f1cd5df 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -40,6 +40,7 @@ static const char *domuuid_fc4 = DOM_UUID "\n\n";
static const char *domid_fc4 = "2\n\n";
static const char *domname_fc4 = "fc4\n\n";
static const char *domstate_fc4 = "running\n\n";
+static const char *domrename_fc4 = "Domain successfully renamed\n\n";
static int testFilterLine(char *buffer,
const char *toRemove)
@@ -237,6 +238,14 @@ static int testCompareDomstateByName(const void *data
ATTRIBUTE_UNUSED)
return testCompareOutputLit(exp, NULL, argv);
}
+static int testCompareDomrenameByName(const void *data ATTRIBUTE_UNUSED)
+{
+ const char *const argv[] = { VIRSH_CUSTOM, "domrename", "fc4",
+ "fc4new", NULL };
+ const char *exp = domrename_fc4;
+ return testCompareOutputLit(exp, NULL, argv);
This is not checking that the VM was actually renamed, only that the
success message was reported, which is pretty useless.