From 76cfb198440293a17131b7b36ad4f22de4a471d1 Mon Sep 17 00:00:00 2001 From: Peter Verveer Date: Fri, 15 Jan 2021 15:25:12 +0100 Subject: [PATCH] Disable network reporting --- python/ert_logger/__init__.py | 36 +++++++++++++---------- tests/job_runner/test_network_reporter.py | 4 +++ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/python/ert_logger/__init__.py b/python/ert_logger/__init__.py index 9a65a420a9..6fef1160c0 100644 --- a/python/ert_logger/__init__.py +++ b/python/ert_logger/__init__.py @@ -11,19 +11,25 @@ } +# Disabled temporarily, according to issue #1095. +# +# The tests in tests/job_runner/test_network_reporter.py are disabled +# accordingly. +# def log_message(input_payload): - payload = deepcopy(BASE_MESSAGE) - payload.update(input_payload) - try: - data = json.dumps(payload) - # Disabling proxies - proxies = {"http": None, "https": None} - requests.post( - LOG_URL, - timeout=3, - headers={"Content-Type": "application/json"}, - data=data, - proxies=proxies, - ) - except: # noqa - pass + # payload = deepcopy(BASE_MESSAGE) + # payload.update(input_payload) + # try: + # data = json.dumps(payload) + # # Disabling proxies + # proxies = {"http": None, "https": None} + # requests.post( + # LOG_URL, + # timeout=3, + # headers={"Content-Type": "application/json"}, + # data=data, + # proxies=proxies, + # ) + # except: # noqa + # pass + pass diff --git a/tests/job_runner/test_network_reporter.py b/tests/job_runner/test_network_reporter.py index dbdea9b3a7..c9aa5115b1 100644 --- a/tests/job_runner/test_network_reporter.py +++ b/tests/job_runner/test_network_reporter.py @@ -8,7 +8,11 @@ from unittest.mock import patch +import pytest +# Network reporting is disabled temporarily in python/ert_logger/__init__.py +# according to issue #1095. +@pytest.mark.skip(reason="Logging to the network is currently disabled") class NetworkReporterTests(TestCase): def setUp(self): self.reporter = Network()