use strict;
use warnings;
-use Test::More tests => 55;
+use Test::More tests => 56;
use Data::Dump qw(dump);
use lib 'lib';
my $hostname = `hostname -s`;
chomp $hostname;
+$hostname =~ s/-dev// && warn "# fix hostname for development";
sub gearman {
my ( $function, $args ) = @_;
ok file_exists "~$login/.meta/files", "file_exists ~$login/.meta/files";
}
-file_exists "~$u1/foo.txt" || BAIL_OUT("~$u1/foo.txt is required for rest of tests");
+if ( ! file_exists("~$u1/foo.txt") ) {
+ diag "create ~$u1/foo.txt";
+ $ENV{RSYNC_PASSWORD} ||= 'secret';
+ system('rsync', '-vv', $0, "rsync://$u1\@127.0.0.1:6501/$u1/" );
+ gearman rename_file => "~$u1/Gearman.t#foo.txt";
+} else {
+ file_exists("~$u1/foo.txt") || BAIL_OUT("~$u1/foo.txt is required for rest of tests");
+}
+
+gearman( 'md5_get' => "~$u1/foo.txt" );
gearman send_file => "~$u1/foo.txt#~$u2/dir with space/file with space";
test_refresh_file_list "$u2";