]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/solver_git: avoid uninitialized warnings in hostname generation
authorEric Wong <e@yhbt.net>
Sat, 11 Jan 2020 22:35:02 +0000 (22:35 +0000)
committerEric Wong <e@yhbt.net>
Mon, 13 Jan 2020 04:36:46 +0000 (04:36 +0000)
Outside of tests, this is only relevant for non-PSGI use, which
may happen someday...

Fixes: cb1c874520153f5c ("inbox: use PublicInbox::Git::host_prefix_url for base_url")
t/solver_git.t

index 77fa1e09691d01cf0b35531528f37b7c1adc3966..98317faefce2238a7c33d668cdd990564b517504 100644 (file)
@@ -42,7 +42,8 @@ $ibx->{-repo_objs} = [ $git ];
 my $res;
 my $solver = PublicInbox::SolverGit->new($ibx, sub { $res = $_[0] });
 open my $log, '+>>', "$inboxdir/solve.log" or die "open: $!";
-my $psgi_env = { 'psgi.errors' => *STDERR, 'psgi.url_scheme' => 'http' };
+my $psgi_env = { 'psgi.errors' => *STDERR, 'psgi.url_scheme' => 'http',
+               'HTTP_HOST' => 'example.com' };
 $solver->solve($psgi_env, $log, '69df7d5', {});
 ok($res, 'solved a blob!');
 my $wt_git = $res->[0];