From 49217b5c211b54b02c4773054660b8ee2d829d80 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 20 Jan 2012 19:39:29 +0100 Subject: [PATCH] cleanup tests --- t/Gearman.t | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/t/Gearman.t b/t/Gearman.t index b93b620..9ef9f7c 100755 --- a/t/Gearman.t +++ b/t/Gearman.t @@ -14,12 +14,19 @@ chomp $hostname; my $user = $ARGV[0] || 2001; -ok my $o = CloudStore::Gearman->gearman_do( $hostname . '_s1_quota_get' => $user ), 'quota_get'; +sub gearman { + my ( $function, $args ) = @_; + ok my $o = CloudStore::Gearman->gearman_do( @_ ), $_[0]; + diag dump $o; + return $o; +} + +my $o = gearman $hostname . '_s1_quota_get' => $user; diag dump $o; cmp_ok $o, '=~', qr/^(\d+)\s+(\d+)$/, 'format: used quota'; -ok $o = CloudStore::Gearman->gearman_do( 'user_usage' => $user ), 'user_usage'; -diag dump $o; +gearman( 'user_usage' => $user ); + +gearman( $hostname . '_s1_torrent_list' ); + -ok $o = CloudStore::Gearman->gearman_do( $hostname . '_s1_torrent_list' ), 'torrent_list'; -diag dump $o; -- 2.20.1