Skip to content

Commit

Permalink
Tests: additional uwsgi checks.
Browse files Browse the repository at this point in the history
If uwsgi is built without SSL support, skip corresponding tests.
  • Loading branch information
vlhomutov committed Jan 25, 2023
1 parent 71ce4bc commit 08f5849
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions tests/uwsgi_ssl.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# (C) Maxim Dounin
# (C) Nginx, Inc.
# (C) 2023 Web Server LLC

# Test for uwsgi backend with SSL.

Expand All @@ -24,8 +25,12 @@ select STDERR; $| = 1;
select STDOUT; $| = 1;

my $t = Test::Nginx->new()->has(qw/http uwsgi http_ssl/)
->has_daemon('uwsgi')->has_daemon('openssl')->plan(7)
->write_file_expand('nginx.conf', <<'EOF');
->has_daemon('uwsgi')->has_daemon('openssl');

my $uwsgihelp = `uwsgi -h`;
plan(skip_all => 'no ssl support in uwsgi') if ($uwsgihelp !~ /--ssl-socket/);

$t->plan(7)->write_file_expand('nginx.conf', <<'EOF');
%%TEST_GLOBALS%%
Expand Down Expand Up @@ -89,7 +94,6 @@ def application(env, start_response):
END

my $uwsgihelp = `uwsgi -h`;
my @uwsgiopts = ();

if ($uwsgihelp !~ /--wsgi-file/) {
Expand Down
10 changes: 7 additions & 3 deletions tests/uwsgi_ssl_verify.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# (C) Maxim Dounin
# (C) Sergey Kandaurov
# (C) Nginx, Inc.
# (C) 2023 Web Server LLC

# Tests for uwsgi backend with SSL, backend certificate verification.

Expand All @@ -24,8 +25,12 @@ select STDERR; $| = 1;
select STDOUT; $| = 1;

my $t = Test::Nginx->new()->has(qw/http http_ssl uwsgi/)
->has_daemon('uwsgi')->has_daemon('openssl')->plan(6)
->write_file_expand('nginx.conf', <<'EOF');
->has_daemon('uwsgi')->has_daemon('openssl');

my $uwsgihelp = `uwsgi -h`;
plan(skip_all => 'no ssl support in uwsgi') if ($uwsgihelp !~ /--ssl-socket/);

$t->plan(6)->write_file_expand('nginx.conf', <<'EOF');
%%TEST_GLOBALS%%
Expand Down Expand Up @@ -135,7 +140,6 @@ def application(env, start_response):
END

my $uwsgihelp = `uwsgi -h`;
my @uwsgiopts = ();

if ($uwsgihelp !~ /--wsgi-file/) {
Expand Down

0 comments on commit 08f5849

Please sign in to comment.