]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd.t
nntp: NNTPS and NNTP+STARTTLS working
[public-inbox.git] / t / nntpd.t
index a95fb6fca8801d66ac4a97efa61bdd342fa0a8ac..6cba2be435089207d7ad8a33d76b23f11d417461 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -91,7 +91,7 @@ EOF
                $im->add($mime);
                $im->done;
                if ($version == 1) {
-                       my $s = PublicInbox::SearchIdx->new($mainrepo, 1);
+                       my $s = PublicInbox::SearchIdx->new($ibx, 1);
                        $s->index_sync;
                }
        }
@@ -106,6 +106,8 @@ EOF
        is_deeply($list, { $group => [ qw(1 1 n) ] }, 'LIST works');
        is_deeply([$n->group($group)], [ qw(0 1 1), $group ], 'GROUP works');
        is_deeply($n->listgroup($group), [1], 'listgroup OK');
+       ok(!$n->starttls, 'STARTTLS fails when unconfigured');
+       is($n->code, 580, 'got 580 code on server w/o TLS');
 
        %opts = (
                PeerAddr => $host_port,
@@ -243,7 +245,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
                $im->add($for_leafnode);
                $im->done;
                if ($version == 1) {
-                       my $s = PublicInbox::SearchIdx->new($mainrepo, 1);
+                       my $s = PublicInbox::SearchIdx->new($ibx, 1);
                        $s->index_sync;
                }
                my $hdr = $n->head("<$long_hdr>");