projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cfaeb99
)
rewrite tests and test --inplace ignore
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 11 Feb 2012 14:50:35 +0000
(15:50 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 11 Feb 2012 14:50:35 +0000
(15:50 +0100)
t/client.t
patch
|
blob
|
history
diff --git
a/t/client.t
b/t/client.t
index
67cc9ed
..
e0a6845
100755
(executable)
--- a/
t/client.t
+++ b/
t/client.t
@@
-6,27
+6,24
@@
use Test::More tests => 5;
use Data::Dump qw(dump);
use File::Slurp;
use Data::Dump qw(dump);
use File::Slurp;
-my $user = 'u2001';
$ENV{RSYNC_PASSWORD} = 'password';
sub upload {
$ENV{RSYNC_PASSWORD} = 'password';
sub upload {
+ my $user = shift @_;
system('rsync', '-vv', @_, "rsync://$user\@127.0.0.1:6501/$user/" ), "rsync @_ $user";
}
mkdir('/tmp/client');
system('rsync', '-vv', @_, "rsync://$user\@127.0.0.1:6501/$user/" ), "rsync @_ $user";
}
mkdir('/tmp/client');
-diag "create shared file one";
-
ok write_file('/tmp/client/one', "one");
ok write_file('/tmp/client/one', "one");
-ok upload('/tmp/client/one'), "upload $user";
-
-$user = 'u2002';
-ok upload('/tmp/client/one'), "upload $user";
+diag "reload rsync config with invalid username";
+upload('reload-config' => '/tmp/client/one');
+ok upload('u2001' => '/tmp/client/one'), "upload";
-
diag "modify shared file one
";
+
ok upload('u2002' => '/tmp/client/one'), "upload shared
";
-ok write_file('/tmp/client/one', "modif
ied
");
+ok write_file('/tmp/client/one', "modif
y
");
-ok upload('
/tmp/client/one'), "upload $user
";
+ok upload('
u2002' => '--inplace','/tmp/client/one'), "modify shared
";