Skip to content

Commit

Permalink
tests: updated ci for stream >= 1.25.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahao committed Aug 6, 2024
1 parent ebcf861 commit 9b4c301
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ install:
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi
- git clone https://github.com/openresty/openresty-devel-utils.git
- git clone https://github.com/openresty/lua-cjson.git
- git clone -b bump-1.27.0 https://github.com/xiaocang/openresty.git ../openresty
- git clone https://github.com/openresty/openresty.git ../openresty
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx
- git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module
- git clone https://github.com/openresty/mockeagain.git
Expand Down
1 change: 1 addition & 0 deletions t/023-preread/client-abort.t
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ delete thread 1
[error]
--- error_log
client prematurely closed connection
--- skip_nginx: 4: >= 1.25.5



Expand Down
3 changes: 3 additions & 0 deletions t/023-preread/req-socket.t
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ finalize stream session: 200
--- no_error_log
[warn]
[error]
--- skip_nginx: 5: >= 1.25.5



Expand Down Expand Up @@ -509,6 +510,7 @@ received: hello world
attempt to peek on a consumed socket
--- no_error_log
[warn]
--- skip_nginx: 4: >= 1.25.5



Expand Down Expand Up @@ -568,3 +570,4 @@ $ssl_preread_server_name = my.sni.server.name while prereading client data
[warn]
assertion failed!
lua entry thread aborted
--- skip_nginx: 8: >= 1.25.5
1 change: 1 addition & 0 deletions t/023-preread/sanity.t
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ $ssl_preread_server_name = my.sni.server.name while prereading client data
--- no_error_log
[crit]
[warn]
--- skip_nginx: 5: >= 1.25.5



Expand Down
15 changes: 14 additions & 1 deletion t/023-preread/socket-keepalive.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# vim:set ft= ts=4 sw=4 et fdm=marker:

use Test::Nginx::Socket::Lua::Stream;
our $SkipReason;

BEGIN {
use Test::Nginx::Util;

my $nginx_version = Test::Nginx::Util::get_nginx_version();

if (eval "$nginx_version >= 1.25.5") {
$SkipReason = "Nginx version greater than 1.25.5 have changed behavior, current version $nginx_version";
}
}

use Test::Nginx::Socket::Lua::Stream $SkipReason ? (skip_all => $SkipReason) : ();

repeat_each(2);

plan tests => repeat_each() * (blocks() * 5);
Expand Down
14 changes: 13 additions & 1 deletion t/023-preread/tcp-socket-timeout.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# vim:set ft= ts=4 sw=4 et fdm=marker:

our $SkipReason;

BEGIN {
use Test::Nginx::Util;

my $nginx_version = Test::Nginx::Util::get_nginx_version();

if (eval "$nginx_version >= 1.25.5") {
$SkipReason = "Nginx version greater than 1.25.5 have changed behavior, current version $nginx_version";
}
}

BEGIN {
if (!defined $ENV{LD_PRELOAD}) {
$ENV{LD_PRELOAD} = '';
Expand All @@ -20,7 +32,7 @@ BEGIN {
$ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'get helloworld';
}

use Test::Nginx::Socket::Lua::Stream;
use Test::Nginx::Socket::Lua::Stream $SkipReason ? (skip_all => $SkipReason) : ();
repeat_each(2);

plan tests => repeat_each() * (blocks() * 4 + 8);
Expand Down
14 changes: 13 additions & 1 deletion t/023-preread/tcp-socket.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# vim:set ft= ts=4 sw=4 et fdm=marker:

use Test::Nginx::Socket::Lua::Stream;
our $SkipReason;

BEGIN {
use Test::Nginx::Util;

my $nginx_version = Test::Nginx::Util::get_nginx_version();

if (eval "$nginx_version >= 1.25.5") {
$SkipReason = "Nginx version greater than 1.25.5 have changed behavior, current version $nginx_version";
}
}

use Test::Nginx::Socket::Lua::Stream $SkipReason ? (skip_all => $SkipReason) : ();
repeat_each(2);

plan tests => repeat_each() * 24;
Expand Down

0 comments on commit 9b4c301

Please sign in to comment.