Skip websocket test; needs networking

Resolves: RHEL-12339

Signed-off-by: Major Hayden <mhayden@redhat.com>
This commit is contained in:
Major Hayden 2024-01-31 16:28:22 -06:00 committed by Major Hayden
parent db63067637
commit ed080ae621
No known key found for this signature in database
2 changed files with 39 additions and 1 deletions

View File

@ -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 <mhayden@redhat.com> - 0.16.16-2
- Skip websocket test as it requires networking
* Wed Apr 26 2023 Nikola Forró <nforro@redhat.com> - 0.16.16-1
- New upstream release 0.16.16

32
skip-websocket-test.patch Normal file
View File

@ -0,0 +1,32 @@
From fc55d90042f7389d81bd4592a20f1e93cf20e795 Mon Sep 17 00:00:00 2001
From: Major Hayden <major@redhat.com>
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