use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More tests => 19;
use Data::Dump qw(dump);
use lib 'lib';
sub gearman {
my ( $function, $args ) = @_;
- ok my $o = CloudStore::Gearman->gearman_do( @_ ), $_[0];
+ ok my $o = CloudStore::Gearman->gearman_do( @_ ), join(' ',@_);
diag dump $o;
return $o;
}
gearman( file_size => '~u2001/foo.txt' ), '==',
gearman( file_size => '~u2002/baz.txt' ), 'size_same';
+diag "test symlink to other shard";
+gearman send_file => '~u2001/foo.txt#~u2004/foo.txt';
+my $size_1 = gearman( file_size => '~u2001/foo.txt' );
+my $size_2 = gearman( file_size => '~u2004/foo.txt' );
+
+cmp_ok $size_1, '==', $size_2, 'symlink size same';
+
gearman delete => '~u2002/baz.txt';
ok ! CloudStore::Gearman->gearman_do( file_size => '~u2002/baz.txt' ), 'deleted file size';