From: Robert 'phaylon' Sedlacek Date: Wed, 9 May 2012 01:40:27 +0000 (+0000) Subject: DiskUsage probe tests X-Git-Tag: v0.001_001~110 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e77eeef29fd62961684b171c6fa3c6b8523a26c;p=scpubgit%2FSystem-Introspector.git DiskUsage probe tests --- diff --git a/t/diskusage.t b/t/diskusage.t new file mode 100644 index 0000000..6499aa3 --- /dev/null +++ b/t/diskusage.t @@ -0,0 +1,15 @@ +use strictures 1; +use Test::More; + +use System::Introspector::DiskUsage; + +my $probe = System::Introspector::DiskUsage->new; +my $data = $probe->gather; + +ok scalar(@$data), 'received data'; +my @fields = qw( filesystem blocks_1024 used available capacity mount_point ); +for my $field (@fields) { + ok not(grep { not defined $_->{$field} } @$data), "all have $field"; +} + +done_testing;