summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2009-08-05 23:33:22 +0100
committerMatthew Booth <mbooth@redhat.com>2009-08-06 09:19:56 +0100
commitb1e3c305f8e604a527c2f6b5a8f61cfebeec2b41 (patch)
tree2804d9c413f751eabba867ea9bb9a4bca68db94e
parent65326fe130cbb08ca797f257b552f301f0cec412 (diff)
downloadlibguestfs-b1e3c305f8e604a527c2f6b5a8f61cfebeec2b41.tar.gz
libguestfs-b1e3c305f8e604a527c2f6b5a8f61cfebeec2b41.tar.xz
libguestfs-b1e3c305f8e604a527c2f6b5a8f61cfebeec2b41.zip
Fix test failures in upload and download (RHBZ#515764)
The tests hardcoded an MD5 of the test file, COPYING.LIB, whose contents had change. This change causes it to compute the MD5 rather than hardcoding it. OCaml provided by rjones.
-rwxr-xr-xsrc/generator.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 94dc268e..7ac4ac80 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -1756,7 +1756,8 @@ This uses the L<blockdev(8)> command.");
[InitBasicFS, Always, TestOutput (
(* Pick a file from cwd which isn't likely to change. *)
[["upload"; "../COPYING.LIB"; "/COPYING.LIB"];
- ["checksum"; "md5"; "/COPYING.LIB"]], "e3eda01d9815f8d24aae2dbd89b68b06")],
+ ["checksum"; "md5"; "/COPYING.LIB"]],
+ Digest.to_hex (Digest.file "COPYING.LIB"))],
"upload a file from the local machine",
"\
Upload local file C<filename> to C<remotefilename> on the
@@ -1772,7 +1773,8 @@ See also C<guestfs_download>.");
[["upload"; "../COPYING.LIB"; "/COPYING.LIB"];
["download"; "/COPYING.LIB"; "testdownload.tmp"];
["upload"; "testdownload.tmp"; "/upload"];
- ["checksum"; "md5"; "/upload"]], "e3eda01d9815f8d24aae2dbd89b68b06")],
+ ["checksum"; "md5"; "/upload"]],
+ Digest.to_hex (Digest.file "COPYING.LIB"))],
"download a file to the local machine",
"\
Download file C<remotefilename> and save it as C<filename>