Re: [PATCH v2 2/2] tests: Adding test case for 'domrename' command inside virshtest.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux