Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Disable network reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
verveerpj authored and sondreso committed Jan 18, 2021
1 parent aa0dc3c commit 76cfb19
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
36 changes: 21 additions & 15 deletions python/ert_logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions tests/job_runner/test_network_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 76cfb19

Please sign in to comment.