You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2023/06/28 11:03:29 UTC
svn commit: r1910654 - /httpd/httpd/trunk/test/modules/http2/test_800_websockets.py
Author: icing
Date: Wed Jun 28 11:03:29 2023
New Revision: 1910654
URL: http://svn.apache.org/viewvc?rev=1910654&view=rev
Log:
tests: add the websockets python module version checks needed for our CI infra
Modified:
httpd/httpd/trunk/test/modules/http2/test_800_websockets.py
Modified: httpd/httpd/trunk/test/modules/http2/test_800_websockets.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_800_websockets.py?rev=1910654&r1=1910653&r2=1910654&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_800_websockets.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_800_websockets.py Wed Jun 28 11:03:29 2023
@@ -5,8 +5,10 @@ import shutil
import subprocess
import time
from datetime import timedelta, datetime
+import packaging.version
import pytest
+import websockets
from pyhttpd.result import ExecResult
from pyhttpd.ws_util import WsFrameReader, WsFrame
@@ -15,6 +17,9 @@ from .env import H2Conf, H2TestEnv
log = logging.getLogger(__name__)
+ws_version = packaging.version.parse(websockets.version.version)
+ws_version_min = packaging.version.Version('10.4')
+
def ws_run(env: H2TestEnv, path, authority=None, do_input=None, inbytes=None,
send_close=True, timeout=5, scenario='ws-stdin',
@@ -80,6 +85,8 @@ def ws_run(env: H2TestEnv, path, authori
@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
@pytest.mark.skipif(condition=not H2TestEnv().httpd_is_at_least("2.5.0"),
reason=f'need at least httpd 2.5.0 for this')
+@pytest.mark.skipif(condition=ws_version < ws_version_min,
+ reason=f'websockets is {ws_version}, need at least {ws_version_min}')
class TestWebSockets:
@pytest.fixture(autouse=True, scope='class')