Some tests failed while building under RHEL 9 with the stricter network configuration in mock. Resolves: RHEL-12339 Signed-off-by: Major Hayden <major@redhat.com>
91 lines
3.1 KiB
Diff
91 lines
3.1 KiB
Diff
From 21a2d3423786a0d2b0c426417e4450378b607f8c Mon Sep 17 00:00:00 2001
|
|
From: Major Hayden <major@redhat.com>
|
|
Date: Fri, 2 Feb 2024 10:11:44 -0600
|
|
Subject: [PATCH] Skip tests which require networking
|
|
|
|
Signed-off-by: Major Hayden <major@redhat.com>
|
|
---
|
|
test/test_eventstream_rpc.py | 4 ++--
|
|
test/test_http_client.py | 2 ++
|
|
test/test_io.py | 1 +
|
|
test/test_websocket.py | 2 ++
|
|
4 files changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/test/test_eventstream_rpc.py b/test/test_eventstream_rpc.py
|
|
index 35ddac1..700bac5 100644
|
|
--- a/test/test_eventstream_rpc.py
|
|
+++ b/test/test_eventstream_rpc.py
|
|
@@ -12,7 +12,7 @@ from queue import Queue
|
|
from test import NativeResourceTest, TIMEOUT
|
|
from threading import Event
|
|
import time
|
|
-from unittest import skipUnless
|
|
+from unittest import skip, skipUnless
|
|
from uuid import UUID, uuid4
|
|
import weakref
|
|
|
|
@@ -91,7 +91,7 @@ class ContinuationHandler(ClientContinuationHandler):
|
|
self.fail_test("shutdown can only fire once")
|
|
self.record.close_call.set()
|
|
|
|
-
|
|
+@skip("Requires network")
|
|
class FailureClientTests(NativeResourceTest):
|
|
def _fail_test_from_callback(self, msg):
|
|
print("ERROR FROM CALLBACK", msg)
|
|
diff --git a/test/test_http_client.py b/test/test_http_client.py
|
|
index 5af87b6..4744dec 100644
|
|
--- a/test/test_http_client.py
|
|
+++ b/test/test_http_client.py
|
|
@@ -114,6 +114,7 @@ class TestClient(NativeResourceTest):
|
|
def test_connect_http(self):
|
|
self._test_connect(secure=False)
|
|
|
|
+ @unittest.skip("Requires network")
|
|
def test_connect_https(self):
|
|
self._test_connect(secure=True)
|
|
|
|
@@ -347,6 +348,7 @@ class TestClient(NativeResourceTest):
|
|
tls_connection_options=tls_conn_opt)
|
|
return connection_future.result(self.timeout)
|
|
|
|
+ @unittest.skip("Requires network")
|
|
def test_h2_client(self):
|
|
url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt")
|
|
connection = self._new_h2_client_connection(url)
|
|
diff --git a/test/test_io.py b/test/test_io.py
|
|
index d841c04..8b0f228 100644
|
|
--- a/test/test_io.py
|
|
+++ b/test/test_io.py
|
|
@@ -9,6 +9,7 @@ import sys
|
|
import unittest
|
|
|
|
|
|
+@unittest.skip("Requires network")
|
|
class EventLoopGroupTest(NativeResourceTest):
|
|
def test_init_defaults(self):
|
|
event_loop_group = EventLoopGroup()
|
|
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
|
|
|