Skip to content

Commit

Permalink
Agent: Rename EVENTS_API_URL to AGENT_EVENTS_API_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
VakarisZ committed Sep 16, 2022
1 parent dd2ed50 commit 998c1d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions monkey/infection_monkey/agent_event_forwarder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


DEFAULT_TIME_PERIOD_SECONDS = 5
EVENTS_API_URL = "https://%s/api/agent-events"
AGENT_EVENTS_API_URL = "https://%s/api/agent-events"


class AgentEventForwarder:
Expand Down Expand Up @@ -86,7 +86,7 @@ def _send_events_to_island(self):
try:
logger.debug(f"Sending Agent events to Island at {self._server_address}: {events}")
requests.post( # noqa: DUO123
EVENTS_API_URL % (self._server_address,),
AGENT_EVENTS_API_URL % (self._server_address,),
json=events,
verify=False,
timeout=MEDIUM_REQUEST_TIMEOUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import requests_mock

from infection_monkey.agent_event_forwarder import EVENTS_API_URL, BatchingAgentEventForwarder
from infection_monkey.agent_event_forwarder import AGENT_EVENTS_API_URL, BatchingAgentEventForwarder

SERVER = "1.1.1.1:9999"

Expand All @@ -20,7 +20,7 @@ def event_sender():

def test_send_events(event_sender):
with requests_mock.Mocker() as mock:
mock.post(EVENTS_API_URL % SERVER)
mock.post(AGENT_EVENTS_API_URL % SERVER)

event_sender.start()

Expand All @@ -38,7 +38,7 @@ def test_send_events(event_sender):

def test_send_remaining_events(event_sender):
with requests_mock.Mocker() as mock:
mock.post(EVENTS_API_URL % SERVER)
mock.post(AGENT_EVENTS_API_URL % SERVER)

event_sender.start()

Expand Down

0 comments on commit 998c1d7

Please sign in to comment.