]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-daemon.t
lei up --all: avoid double-close on shared STDOUT
[public-inbox.git] / t / lei-daemon.t
index 84e2791d6fcc5a0839dd882659cbf9b241776016..b0c94a8745286fa0c5cf787785c6690862be332e 100644 (file)
@@ -21,14 +21,9 @@ test_lei({ daemon_only => 1 }, sub {
        ok(kill(0, $pid), 'pid is valid');
        ok(-S $sock, 'sock created');
        is(-s $err_log, 0, 'nothing in errors.log');
-       open my $efh, '>>', $err_log or BAIL_OUT $!;
-       print $efh "phail\n" or BAIL_OUT $!;
-       close $efh or BAIL_OUT $!;
-
        lei_ok('daemon-pid');
        chomp(my $pid_again = $lei_out);
        is($pid, $pid_again, 'daemon-pid idempotent');
-       like($lei_err, qr/phail/, 'got mock "phail" error previous run');
 
        SKIP: {
                skip 'only testing open files on Linux', 1 if $^O ne 'linux';
@@ -73,15 +68,6 @@ test_lei({ daemon_only => 1 }, sub {
        lei_ok('daemon-pid');
        chomp $lei_out;
        is($lei_out, $new_pid, 'PID unchanged after -0/-CHLD');
-
-       SKIP: { # socket inaccessible
-               skip "cannot test connect EPERM as root", 3 if $> == 0;
-               chmod 0000, $sock or BAIL_OUT "chmod 0000: $!";
-               lei_ok('help', \'connect fail, one-shot fallback works');
-               like($lei_err, qr/\bconnect\(/, 'connect error noted');
-               like($lei_out, qr/^usage: /, 'help output works');
-               chmod 0700, $sock or BAIL_OUT "chmod 0700: $!";
-       }
        unlink $sock or BAIL_OUT "unlink($sock) $!";
        for (0..100) {
                kill('CHLD', $new_pid) or last;