# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# manifest.js.gz generation and grok-pull integration test
# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# manifest.js.gz generation and grok-pull integration test
use PublicInbox::Import;
use IO::Uncompress::Gunzip qw(gunzip);
require_mods(qw(json URI::Escape Plack::Builder Digest::SHA HTTP::Tiny));
use PublicInbox::Import;
use IO::Uncompress::Gunzip qw(gunzip);
require_mods(qw(json URI::Escape Plack::Builder Digest::SHA HTTP::Tiny));
is(xsys('git', "--git-dir=$alt", qw(config gitweb.owner),
"lorelei \xc4\x80"), 0,
'set gitweb user');
is(xsys('git', "--git-dir=$alt", qw(config gitweb.owner),
"lorelei \xc4\x80"), 0,
'set gitweb user');
open $fh, '>', $cfgfile or xbail "open $cfgfile: $!";
$fh->autoflush(1);
print $fh <<"" or xbail "print $!";
open $fh, '>', $cfgfile or xbail "open $cfgfile: $!";
$fh->autoflush(1);
print $fh <<"" or xbail "print $!";
tiny_test($json, $host, $port, 1);
undef $sock;
tiny_test($json, $host, $port, 1);
undef $sock;
skip('grok-pull not available', 12);
my ($grok_version) = (xqx([$grok_pull, "--version"])
=~ /(\d+)\.(?:\d+)(?:\.(\d+))?/);
skip('grok-pull not available', 12);
my ($grok_version) = (xqx([$grok_pull, "--version"])
=~ /(\d+)\.(?:\d+)(?:\.(\d+))?/);