Skip to content

Commit

Permalink
Tests: http_api module dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlhomutov committed Jan 30, 2023
1 parent 08f5849 commit b70cfb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/lib/Test/Nginx.pm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ sub has_module($) {
mail => '--with-mail((?!\S)|=dynamic)',
flv => '--with-http_flv_module',
perl => '--with-http_perl_module',
http_api
=> '(?s)^(?!.*--without-http_api_module)',
auth_request
=> '--with-http_auth_request_module',
realip => '--with-http_realip_module',
Expand Down
3 changes: 2 additions & 1 deletion tests/upstream_resolve.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ plan(skip_all => "JSON::PP not installed") if $@;
# the test depends on availability of 127.0.0.0/8 subnet on targets
plan(skip_all => 'OS is not linux') if $^O ne 'linux';

my $t = Test::Nginx->new()->has(qw/http proxy upstream_zone --with-debug/)
my $t = Test::Nginx->new()
->has(qw/http http_api proxy upstream_zone --with-debug/)
->has_daemon("dnsmasq");

# see https://trac.nginx.org/nginx/ticket/1831
Expand Down
2 changes: 1 addition & 1 deletion tests/upstream_srv.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plan(skip_all => "JSON::PP not installed") if $@;
# the test depends on availability of 127.0.0.0/8 subnet on targets
plan(skip_all => 'OS is not linux') if $^O ne 'linux';

my $t = Test::Nginx->new()->has(qw/http proxy upstream_zone/)
my $t = Test::Nginx->new()->has(qw/http http_api proxy upstream_zone/)
->has_daemon("dnsmasq")->plan(3)
->write_file_expand('nginx.conf', <<'EOF');
Expand Down
3 changes: 2 additions & 1 deletion tests/upstream_stat.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ select STDOUT; $| = 1;
eval { require JSON::PP; };
plan(skip_all => "JSON::PP not installed") if $@;

my $t = Test::Nginx->new()->has(qw/http proxy upstream_zone upstream_hash/)
my $t = Test::Nginx->new()
->has(qw/http http_api proxy upstream_zone upstream_hash/)
->plan(50)->write_file_expand('nginx.conf', <<'EOF');
%%TEST_GLOBALS%%
Expand Down

0 comments on commit b70cfb1

Please sign in to comment.