From ed080ae6210c0918fd12beab39f7e9ab67fe0d40 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 31 Jan 2024 16:28:22 -0600 Subject: [PATCH] Skip websocket test; needs networking Resolves: RHEL-12339 Signed-off-by: Major Hayden --- python-awscrt.spec | 8 +++++++- skip-websocket-test.patch | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 skip-websocket-test.patch diff --git a/python-awscrt.spec b/python-awscrt.spec index d57806e..8fb6fd0 100644 --- a/python-awscrt.spec +++ b/python-awscrt.spec @@ -4,7 +4,7 @@ Python bindings for the AWS Common Runtime} Name: python-awscrt Version: 0.16.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python bindings for the AWS Common Runtime # All files are licensed under Apache-2.0, except: @@ -19,6 +19,9 @@ Source0: %{pypi_source awscrt} # one test requires internet connection, skip it Patch1: skip-test-requiring-network.patch +# Websocket test requires network connectivity. +Patch2: skip-websocket-test.patch + BuildRequires: python%{python3_pkgversion}-devel BuildRequires: gcc @@ -76,6 +79,9 @@ PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{py %changelog +* Wed Jan 31 2024 Major Hayden - 0.16.16-2 +- Skip websocket test as it requires networking + * Wed Apr 26 2023 Nikola Forró - 0.16.16-1 - New upstream release 0.16.16 diff --git a/skip-websocket-test.patch b/skip-websocket-test.patch new file mode 100644 index 0000000..ccfe752 --- /dev/null +++ b/skip-websocket-test.patch @@ -0,0 +1,32 @@ +From fc55d90042f7389d81bd4592a20f1e93cf20e795 Mon Sep 17 00:00:00 2001 +From: Major Hayden +Date: Wed, 31 Jan 2024 16:24:32 -0600 +Subject: [PATCH] Skip websocket test + +--- + test/test_websocket.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/test_websocket.py b/test/test_websocket.py +index 17de0a9..860d434 100644 +--- a/test/test_websocket.py ++++ b/test/test_websocket.py +@@ -17,6 +17,7 @@ from test import NativeResourceTest + import threading + from time import sleep, time + from typing import Optional ++import unittest + + # using a 3rdparty websocket library for the server + import websockets.server as websockets_server_3rdparty +@@ -491,6 +492,7 @@ class TestClient(NativeResourceTest): + + self.assertIsNone(handler.exception) + ++ @unittest.skip("Requires network") + def test_exception_from_incoming_frame_callback_closes_websocket(self): + # loop 3 times, once for each type of on_incoming_frame_X callback + for i in ('begin', 'payload', 'complete'): +-- +2.43.0 +