X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=xt%2Fnet_writer-imap.t;h=cb2ea61ff8e365d307360e4bbef854fa309e2a15;hb=1c52f49354aa83e71fcceccae888da0c77f2391d;hp=aeed314499642e09d0ce7ca167e026078dfa7273;hpb=9189e65e01c529016d3000f3aa78d91e4efc4afe;p=public-inbox.git diff --git a/xt/net_writer-imap.t b/xt/net_writer-imap.t index aeed3144..cb2ea61f 100644 --- a/xt/net_writer-imap.t +++ b/xt/net_writer-imap.t @@ -19,7 +19,8 @@ require_mods('Mail::IMAPClient'); require_ok 'PublicInbox::NetWriter'; my $host = (split(/\./, hostname))[0]; my ($base) = ($0 =~ m!\b([^/]+)\.[^\.]+\z!); -my $folder = "INBOX.$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)). +my $SEP = $ENV{IMAP_SEPARATOR} || '.'; +my $folder = "INBOX$SEP$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)). "-$$-".sprintf('%x', int(rand(0xffffffff))); my $nwr = PublicInbox::NetWriter->new; chop($imap_url) if substr($imap_url, -1) eq '/'; @@ -121,6 +122,12 @@ test_lei(sub { } $set_cred_helper->("$ENV{HOME}/.gitconfig", $cred_set) if $cred_set; + # don't combine these two: + $ENV{TEST_IMAP_COMPRESS} and lei_ok qw(config imap.compress true); + $ENV{TEST_IMAP_DEBUG} and lei_ok qw(config imap.debug true); + my $proxy = $ENV{TEST_IMAP_PROXY}; + lei_ok(qw(config imap.proxy), $proxy) if $proxy; + lei_ok qw(q f:qp@example.com -o), $folder_url; $nwr->imap_each($folder_uri, $imap_slurp_all, my $res = []); is(scalar(@$res), 1, 'got one deduped result') or diag explain($res); @@ -221,7 +228,7 @@ EOM $pub_cfg->each_inbox(sub { $_[0]->subscribe_unlock('ident', $obj) }); my $w = start_script(['-watch'], undef, { 2 => $err_wr }); diag 'waiting for initial fetch...'; - PublicInbox::DS->EventLoop; + PublicInbox::DS::event_loop(); my $ibx = $pub_cfg->lookup_name('wtest'); my $mm = $ibx->mm; ok(defined($mm->num_for('Seen@test.example.com')), @@ -242,6 +249,7 @@ EOM lei_ok qw(q m:testmessage --no-external -o), $folder_url; lei_ok qw(up), $folder_url; + lei_ok qw(up --all=remote); }); undef $cleanup; # remove temporary folder