File: local-sudo.t

package info (click to toggle)
libobject-remote-perl 0.004000-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 488 kB
  • ctags: 248
  • sloc: perl: 2,408; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 515 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use IO::Prompter; # dies, utterly, if loaded after strictures, no idea why
use strictures 1;
use Test::More;
use lib 'xt/lib';

use Object::Remote;


my $user = $ENV{TEST_SUDOUSER}
    or plan skip_all => q{Requires TEST_SUDOUSER to be set};

my $conn = Object::Remote->connect('-')->connect("${user}\@");

my $remote = TestFindUser->new::on($conn);
my $remote_user = $remote->user;
like $remote_user, qr/^\d+$/, 'returned an int';
isnt $remote_user, $<, 'ran as different user';

$remote->send_err;

done_testing;