diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-20 13:14:07 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-20 13:14:07 +0100 |
commit | c5d37435aa9e257fac1c2d517fadc7630fa0d869 (patch) | |
tree | 28b59f9c2354ab14e1d526dae79145a81458c74b /src | |
parent | 469c6cdfd5f2ffb07eaf01c16a21ed1e5cb174c1 (diff) | |
download | libguestfs-c5d37435aa9e257fac1c2d517fadc7630fa0d869.tar.gz libguestfs-c5d37435aa9e257fac1c2d517fadc7630fa0d869.tar.xz libguestfs-c5d37435aa9e257fac1c2d517fadc7630fa0d869.zip |
Add tests for the upload and download commands.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/generator.ml b/src/generator.ml index 191b94df..ae1dfe9f 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1273,7 +1273,10 @@ Reread the partition table on C<device>. This uses the L<blockdev(8)> command."); ("upload", (RErr, [FileIn "filename"; String "remotefilename"]), 66, [], - [], + [InitBasicFS, TestOutput ( + (* Pick a file from cwd which isn't likely to change. *) + [["upload"; "COPYING.LIB"; "/COPYING.LIB"]; + ["checksum"; "md5"; "/COPYING.LIB"]], "e3eda01d9815f8d24aae2dbd89b68b06")], "upload a file from the local machine", "\ Upload local file C<filename> to C<remotefilename> on the @@ -1284,7 +1287,12 @@ C<filename> can also be a named pipe. See also C<guestfs_download>."); ("download", (RErr, [String "remotefilename"; FileOut "filename"]), 67, [], - [], + [InitBasicFS, TestOutput ( + (* Pick a file from cwd which isn't likely to change. *) + [["upload"; "COPYING.LIB"; "/COPYING.LIB"]; + ["download"; "/COPYING.LIB"; "testdownload.tmp"]; + ["upload"; "testdownload.tmp"; "/upload"]; + ["checksum"; "md5"; "/upload"]], "e3eda01d9815f8d24aae2dbd89b68b06")], "download a file to the local machine", "\ Download file C<remotefilename> and save it as C<filename> |