Blame SOURCES/grpc-1.26.0-grpcio_tests-make-network-tests-skippable.patch

cc39db
diff -Naur grpc-1.26.0-original/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py grpc-1.26.0/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
cc39db
--- grpc-1.26.0-original/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py	2019-12-17 20:29:27.000000000 -0500
cc39db
+++ grpc-1.26.0/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py	2021-03-15 10:09:54.802317262 -0400
cc39db
@@ -13,6 +13,7 @@
cc39db
 # limitations under the License.
cc39db
 """Secure client-server interoperability as a unit test."""
cc39db
 
cc39db
+import os
cc39db
 import unittest
cc39db
 
cc39db
 import grpc
cc39db
@@ -29,6 +30,8 @@
cc39db
 class SecureIntraopTest(_intraop_test_case.IntraopTestCase, unittest.TestCase):
cc39db
 
cc39db
     def setUp(self):
cc39db
+        if 'FEDORA_NO_NETWORK_TESTS' in os.environ:
cc39db
+            self.skipTest('Network tests disabled')
cc39db
         self.server = test_common.test_server()
cc39db
         test_pb2_grpc.add_TestServiceServicer_to_server(service.TestService(),
cc39db
                                                         self.server)
cc39db
diff -Naur grpc-1.26.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py grpc-1.26.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py
cc39db
--- grpc-1.26.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py	2019-12-17 20:29:27.000000000 -0500
cc39db
+++ grpc-1.26.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py	2021-03-15 10:08:08.159649736 -0400
cc39db
@@ -13,6 +13,7 @@
cc39db
 # limitations under the License.
cc39db
 """Tests for an actual dns resolution."""
cc39db
 
cc39db
+import os
cc39db
 import unittest
cc39db
 import logging
cc39db
 import six
cc39db
@@ -45,6 +46,8 @@
cc39db
     def tearDown(self):
cc39db
         self._server.stop(None)
cc39db
 
cc39db
+    @unittest.skipIf('FEDORA_NO_NETWORK_TESTS' in os.environ,
cc39db
+                     'Network tests disabled')
cc39db
     def test_connect_loopback(self):
cc39db
         # NOTE(https://github.com/grpc/grpc/issues/18422)
cc39db
         # In short, Gevent + C-Ares = Segfault. The C-Ares driver is not