-package System::Introspector::DiskUsage;
+package System::Introspector::Probe::DiskUsage;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::FileHandles;
+package System::Introspector::Probe::FileHandles;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Groups;
+package System::Introspector::Probe::Groups;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Host;
+package System::Introspector::Probe::Host;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Hosts;
+package System::Introspector::Probe::Hosts;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::LibDirs::Perl;
+package System::Introspector::Probe::LibDirs::Perl;
use Moo;
use Module::Metadata;
use Digest::SHA;
-package System::Introspector::MountPoints;
+package System::Introspector::Probe::MountPoints;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Nagios::CheckMkAgent;
+package System::Introspector::Probe::Nagios::CheckMkAgent;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Packages::Apt;
+package System::Introspector::Probe::Packages::Apt;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Processes;
+package System::Introspector::Probe::Processes;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Puppet;
+package System::Introspector::Probe::Puppet;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Repositories::Git;
+package System::Introspector::Probe::Repositories::Git;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::ResolvConf;
+package System::Introspector::Probe::ResolvConf;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Sudoers;
+package System::Introspector::Probe::Sudoers;
use Moo;
use System::Introspector::Util qw(
-package System::Introspector::Users;
+package System::Introspector::Probe::Users;
use Moo;
use System::Introspector::Util qw(
use strictures 1;
use Test::More;
-use System::Introspector::DiskUsage;
+use System::Introspector::Probe::DiskUsage;
-my $probe = System::Introspector::DiskUsage->new;
+my $probe = System::Introspector::Probe::DiskUsage->new;
my $result = $probe->gather;
ok $result, 'received data';
use strictures 1;
use Test::More;
-use System::Introspector::FileHandles;
+use System::Introspector::Probe::FileHandles;
-my $probe = System::Introspector::FileHandles->new;
+my $probe = System::Introspector::Probe::FileHandles->new;
my $data = $probe->gather;
ok($data, 'received result');
use strictures 1;
use Test::More;
-use System::Introspector::Groups;
+use System::Introspector::Probe::Groups;
-my $probe = System::Introspector::Groups->new;
+my $probe = System::Introspector::Probe::Groups->new;
my $result = $probe->gather;
ok $result, 'received data';
use strictures 1;
use Test::More;
-use System::Introspector::Host;
+use System::Introspector::Probe::Host;
-my $probe = System::Introspector::Host->new;
+my $probe = System::Introspector::Probe::Host->new;
my $data = $probe->gather;
ok length($data->{hostname}), 'found a hostname';
use Test::More;
use FindBin;
-use System::Introspector::Hosts;
+use System::Introspector::Probe::Hosts;
-my $probe = System::Introspector::Hosts->new(
+my $probe = System::Introspector::Probe::Hosts->new(
hosts_file => "$FindBin::Bin/data/hosts",
);
use Test::More;
use FindBin;
-use System::Introspector::LibDirs::Perl;
+use System::Introspector::Probe::LibDirs::Perl;
my $dir = "$FindBin::Bin/data/libdir/perl";
no warnings 'redefine';
-*System::Introspector::LibDirs::Perl::_open_locate_libdirs_pipe = sub {
+*System::Introspector::Probe::LibDirs::Perl::_open_locate_libdirs_pipe = sub {
my $output = "$dir/lib/perl5\n";
open my $fh, '<', \$output;
return $fh;
};
-my $probe = System::Introspector::LibDirs::Perl->new(
+my $probe = System::Introspector::Probe::LibDirs::Perl->new(
root => $dir,
);
my $data = $probe->gather;
use strictures 1;
use Test::More;
-use System::Introspector::MountPoints;
+use System::Introspector::Probe::MountPoints;
-my $probe = System::Introspector::MountPoints->new;
+my $probe = System::Introspector::Probe::MountPoints->new;
my $data = $probe->gather;
ok $data->{fstab}, 'received fstab data';
use strictures 1;
use Test::More;
-use System::Introspector::Nagios::CheckMkAgent;
+use System::Introspector::Probe::Nagios::CheckMkAgent;
no warnings 'redefine';
-*System::Introspector::Nagios::CheckMkAgent::_get_check_mk_agent_output = sub {
+*System::Introspector::Probe::Nagios::CheckMkAgent::_get_check_mk_agent_output = sub {
return map "$_\n",
'<<<foo>>>',
'bar',
'qux';
};
-my $probe = System::Introspector::Nagios::CheckMkAgent->new;
+my $probe = System::Introspector::Probe::Nagios::CheckMkAgent->new;
my $data = $probe->gather;
is_deeply $data,
use strictures 1;
use Test::More;
-use System::Introspector::Packages::Apt;
+use System::Introspector::Probe::Packages::Apt;
-my $probe = System::Introspector::Packages::Apt->new;
+my $probe = System::Introspector::Probe::Packages::Apt->new;
my $data = $probe->gather;
ok(scalar(keys %$data), 'received packages');
use strictures 1;
use Test::More;
-use System::Introspector::Processes;
+use System::Introspector::Probe::Processes;
-my $probe = System::Introspector::Processes->new;
+my $probe = System::Introspector::Probe::Processes->new;
my $result = $probe->gather;
ok($result, 'got result');
use Test::More;
use FindBin;
-use System::Introspector::Puppet;
+use System::Introspector::Probe::Puppet;
-my $probe = System::Introspector::Puppet->new(
+my $probe = System::Introspector::Probe::Puppet->new(
classes_file => "$FindBin::Bin/data/puppet/classes.txt",
resources_file => "$FindBin::Bin/data/puppet/resources.txt",
);
use Test::More;
use File::Temp qw( tempdir );
-use System::Introspector::Repositories::Git;
+use System::Introspector::Probe::Repositories::Git;
plan skip_all => q{Tests require a git executable}
unless `which git`;
my $dir = tempdir(CLEANUP => 1);
no warnings 'redefine';
-*System::Introspector::Repositories::Git::_open_locate_git_config_pipe = sub {
+*System::Introspector::Probe::Repositories::Git::_open_locate_git_config_pipe = sub {
my $output = "$dir/.git/config\n";
open my $fh, '<', \$output;
return $fh;
system("GIT_DIR=$dir/.git git init > /dev/null");
-my $probe = System::Introspector::Repositories::Git->new(
+my $probe = System::Introspector::Probe::Repositories::Git->new(
root => "$dir",
);
use Test::More;
use FindBin;
-use System::Introspector::ResolvConf;
+use System::Introspector::Probe::ResolvConf;
-my $probe = System::Introspector::ResolvConf->new(
+my $probe = System::Introspector::Probe::ResolvConf->new(
resolv_conf_file => "$FindBin::Bin/data/resolv.conf",
);
my $result = $probe->gather;
use Test::More;
use FindBin;
-use System::Introspector::Sudoers;
+use System::Introspector::Probe::Sudoers;
my $dir = "$FindBin::Bin/sudoers-data";
'in bar file',
);
-my $probe = System::Introspector::Sudoers->new(
+my $probe = System::Introspector::Probe::Sudoers->new(
sudoers_file => $start,
hostname => 'host',
);
use strictures 1;
use Test::More;
-use System::Introspector::Users;
+use System::Introspector::Probe::Users;
-my $probe = System::Introspector::Users->new;
+my $probe = System::Introspector::Probe::Users->new;
my $data = $probe->gather;
ok((my $user = $data->{users}{ +getlogin }), 'found own user');